RFR: 8341316: [macos] javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java fails sometimes in macos

lawrence.andrews duke at openjdk.org
Tue Oct 1 18:07:35 UTC 2024


On Tue, 1 Oct 2024 17:00:55 GMT, Manukumar V S <mvs at openjdk.org> wrote:

> 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.

test/jdk/javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java line 85:

> 83:              frame = new JFrame("Test");
> 84:              frame.setSize(300, 300);
> 85:             monitor = new ProgressMonitor(frame, "Progress", "1", 0, 100);

Can you fix the alignment of this lines

test/jdk/javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java line 104:

> 102:     public void run() {
> 103:         System.out.println("TestThread started.........");
> 104:         for (ProgressMonitorEscapeKeyPress.counter = 0; ProgressMonitorEscapeKeyPress.counter <= 100; ProgressMonitorEscapeKeyPress.counter += 1) {

This line is more than 80 characters

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21293#discussion_r1783279069
PR Review Comment: https://git.openjdk.org/jdk/pull/21293#discussion_r1783285654


More information about the client-libs-dev mailing list