JDK-8343104 : java/awt/event/KeyEvent/FunctionKeyTest.java fails on CI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8,11,17,21,24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x,windows
  • CPU: generic
  • Submitted: 2024-10-25
  • Updated: 2025-04-30
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.
Other
tbdUnresolved
Related Reports
Cloners :  
Relates :  
Relates :  
Relates :  
Description
The test fails with the following log:

----------System.out:(2/32)----------
frame.windowActivated
e.id=1004
----------System.err:(26/1344)----------
Failures detected:
java.lang.Error: F11 key press is not received
java.lang.Error: F11 key release is not received
java.lang.Error: F12 key press is not received
java.lang.Error: F12 key release is not received

java.lang.RuntimeException: Test failed: F11 key press is not received
        at FunctionKeyTest.main(FunctionKeyTest.java:127)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:573)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1576)
Caused by: java.lang.Error: F11 key press is not received
        at FunctionKeyTest.testKey(FunctionKeyTest.java:72)
        at FunctionKeyTest.main(FunctionKeyTest.java:108)
        ... 4 more
Caused by: java.util.concurrent.TimeoutException
        at java.base/java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:259)
        at java.base/java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:437)
        at FunctionKeyTest.testKey(FunctionKeyTest.java:69)
        ... 5 more
Comments
There are a couple of failures of the updated test in 8u: ----------System.out:(3/45)---------- frame.windowActivated e.id=1004 e.id=1005 ----------System.err:(29/1550)---------- Failures detected: java.lang.Error: F11 key press is not received java.lang.Error: F11 key release is not received java.lang.Error: F12 key press is not received java.lang.Error: F12 key release is not received java.lang.RuntimeException: Test failed: F11 key press is not received at FunctionKeyTest.main(FunctionKeyTest.java:127) at … at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.Error: F11 key press is not received at FunctionKeyTest.testKey(FunctionKeyTest.java:72) at FunctionKeyTest.main(FunctionKeyTest.java:108) ... 6 more Caused by: java.util.concurrent.TimeoutException at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:257) at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:435) at FunctionKeyTest.testKey(FunctionKeyTest.java:69) ... 7 more
13-12-2024

Other tests—java/awt/Window/HandleWindowDestroyTest/HandleWindowDestroyTest.java and java/awt/List/ItemEventTest/ItemEventTest.java—fail consistently on this particular host. See JDK-8343243 and JDK-8204221 correspondingly. One common thing of these tests is that they override handleEvent(Event) method.
12-11-2024

At this time, the test consistently fails on one of the hosts in Oracle CI. Neither F11 nor F12 are received. I suspected the F11 shortcut to Show Desktop wasn't disabled in Mission Control. But it's not the case. If the shortcut isn't disabled, usually only test for F11 fails, and F12 is handled. I modified the test to capture screenshots after each keyPress and keyRelease, and the window remains in the centre of the screen when F11 is pressed. Thus, the Show Desktop is disabled as expected.
12-11-2024