JDK-8067986 : Test javax/swing/JComboBox/ConsumedKeyTest/ConsumedKeyTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8,9,11,12,13,14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows
  • CPU: generic
  • Submitted: 2014-12-21
  • Updated: 2024-10-10
  • Resolved: 2020-05-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 15
15 b26Fixed
Related Reports
Relates :  
Description
Testsuite name: Regression : jdk_swing
Test name(s):  javax/swing/JComboBox/ConsumedKeyTest/ConsumedKeyTest.java
Product(s) tested: JDK 8u40b17, b18, 8u45b01
OS/architecture: Windows(x64)

Reproducible: Always
Reproducible on machine: spb23274.ru.oracle.com, spb23265.ru.oracle.com, spb23005.ru.oracle.com
Test Bug or Product bug : Test Bug
Is it a Regression: No
Regression introduced in release/build: N/A
Test result on the last GAed release for this train: N/A
Test result on FCS:  N/A

Is it a platform specific issue: No (Fails in Windows, Linux but passing in MacOSX)

Exception/Error from Log:
----------System.err:(14/843)----------
java.lang.RuntimeException: FAILED: Enter was consumed by combo box
	at ConsumedKeyTest.test(ConsumedKeyTest.java:72)
	at ConsumedKeyTest.main(ConsumedKeyTest.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.RuntimeException: FAILED: Enter was consumed by combo box
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: FAILED: Enter was consumed by combo box

Test run log location:
Steps to reproduce: 
1. login into spb23005.ru.oracle.com
2. in cmd , run C:\jdk\jdk1.8.0_40b18\bin\java -jar K:\Jtreg_new\jtreg\lib\jtreg.jar -timeout:5 -vmoptions:"-Xmixed -client " -verbose -a -noreport -jdk:C:\jdk\jdk1.8.0_40b18\  -r:C:\reportDir -w:C:\workDir -dir:K:\regression\workspaces\1.8.0\1.8.0_40b18\j2se\test  javax/swing/JComboBox/ConsumedKeyTest/ConsumedKeyTest.java

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/fdc499f15afe User: psadhukhan Date: 2020-05-30 05:05:12 +0000
30-05-2020

URL: https://hg.openjdk.java.net/jdk/client/rev/fdc499f15afe User: psadhukhan Date: 2020-05-21 06:32:44 +0000
21-05-2020

approved to push
15-05-2020

not just a testbug http://cr.openjdk.java.net/~psadhukhan/8067986/webrev.0/open.patch
27-04-2020

The problem seems to be because of the default action handlers defined in BasicComboBoxUI.java, which includes one for Enter key, but not for Escape key.
08-09-2017

please evaluate
22-12-2014

The issue is reproduced with JDK 8u b122 on Windows.
22-12-2014