javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java fails sometimes in macos. This could be because of a synchronisation issue in the test.
Fix: I have refactored the test to have a CountDownLatch to monitor the ProgressMonitor and when it reaches 20%, it will be triggered. I have also removed the ProgressMonitor update logic execution from EDT as it would block the EDT sometimes. Also added a proper frame disposal mechanism. Testing: This is properly tested multiple times in all available platforms in mach5. ------------- Commit messages: - 8341316: [macos] javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java fails sometimes in macos Changes: https://git.openjdk.org/jdk/pull/21293/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21293&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8341316 Stats: 75 lines in 1 file changed: 15 ins; 21 del; 39 mod Patch: https://git.openjdk.org/jdk/pull/21293.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21293/head:pull/21293 PR: https://git.openjdk.org/jdk/pull/21293
