The test sometimes fail on macos12 citing "Action has not been received". Seems 
like some key events sometimes are not received reliably. 
Proposed fix is to apply mach5 stability fixes which is to set autodelay to 
100ms, move frame to center of screen from top-left, added extra waitForIdle(), 
wait for 1 sec after frame is made visible.
Additionally, it is seen that it mixes Util.hitKeys and robot.keyPress/Release. 
Changed to make it use robot.keyPress/keyRelease all times. Also, updated test 
to have specific error message for specific keyevent so that we know which 
keyevent is not received in case it fails again.

Run on mac12 and all other platforms multiple times and test run is green. Link 
in JBS.

-------------

Commit messages:
 - 8273578: javax/swing/JMenu/4515762/bug4515762.java fails on macOS 12

Changes: https://git.openjdk.java.net/jdk/pull/5564/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5564&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273578
  Stats: 31 lines in 1 file changed: 13 ins; 0 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5564.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5564/head:pull/5564

PR: https://git.openjdk.java.net/jdk/pull/5564

Reply via email to