JDK-8237221 : [macos] java/awt/MenuBar/SeparatorsNavigation/SeparatorsNavigation.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 11,13,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-01-15
  • Updated: 2020-05-18
  • Resolved: 2020-02-17
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 11 JDK 15
11.0.8-oracleFixed 15 b13Fixed
Description
Closed test java/awt/MenuBar/SeparatorsNavigation/SeparatorsNavigation.java sometimes fails on macOS


The test failed: Action was not performed, most likely as a result of hang
The test is over, hit  Ctl-C to stop Java VM
----------System.err:(15/1049)----------
java.lang.RuntimeException: Action was not performed, most likely as a result of hang
	at SeparatorsNavigation.fail(SeparatorsNavigation.java:199)
	at SeparatorsNavigation.init(SeparatorsNavigation.java:88)
	at SeparatorsNavigation.main(SeparatorsNavigation.java:125)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)
Comments
11u backport Just a test addition, I skip this one for now.
18-05-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/81bb0384f515 User: psadhukhan Date: 2020-03-03 09:13:24 +0000
03-03-2020

URL: https://hg.openjdk.java.net/jdk/client/rev/81bb0384f515 User: kizune Date: 2020-02-17 17:05:10 +0000
17-02-2020

Aldo the logic of this test implies that if menu item is selected then when traversing between the top level menus the menu item in the next menu will also be selected which is not true on the Mac OS X so this test has absolutely no meaning there. I think the best solution would be to make it always pass or just be ignored on Mac OS X.
27-01-2020

Test assumes that pressing F10 will bring it into the system level menu. On OS X this is not true - by default the shortcut is Ctrl-F2. And even then every Mac system menu has two additional top level menu - "Apple" and "File". Test knows nothing about that and just uses keyboard presses to navigate to the known place in menu and reports failure if unable to do so. I would either make this test to always pass on Mac or change behavior so it knows the system wide menu shortcut and then uses preprogrammed menu accelerators to move to the first well known location in the menu and only then use arrow keys to navigate to other items.
27-01-2020