RFR: 8342401: [TESTBUG] javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java test fails in ubuntu 22.04 on SBR Hosts

Harshitha Onkar honkar at openjdk.org
Thu Oct 16 00:27:04 UTC 2025


On Wed, 15 Oct 2025 07:41:14 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Test probably was failing due to lack of delay between UI creation and test execution..Delay is added along with rendering frame at screen centre..Also added listener closer to UI creation within EDT
> CI run for 100 iterations are ok on all platforms..

test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java line 66:

> 64: 
> 65:                 SwingUtilities.invokeAndWait(() -> {
> 66:                     frame = new JFrame(")JSpinnerButtonFocusTest");

Extra bracket in title

test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java line 96:

> 94: 
> 95:                     frame.setAlwaysOnTop(true);
> 96:                     frame.pack();

Frame size can be made a little bigger instead of frame.pack().

test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java line 102:

> 100:                 robot.waitForIdle();
> 101:                 robot.delay(1000);
> 102: 

This is on unedited line: Ln#107, 15 minutes of await time looks really long. I think 1 or 2 mins would be more than sufficient ?


 if (!latch1.await(15, TimeUnit.MINUTES)) {
                    throw new RuntimeException(LF.getClassName() +
                            ": Timeout waiting for editor1 to gain focus.");
}

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27815#discussion_r2434256032
PR Review Comment: https://git.openjdk.org/jdk/pull/27815#discussion_r2434261247
PR Review Comment: https://git.openjdk.org/jdk/pull/27815#discussion_r2434258588


More information about the client-libs-dev mailing list