<Swing Dev> RFR: 8160720: [TEST_BUG] javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java

Sergey Bylokhov serb at openjdk.java.net
Wed Feb 10 11:28:39 UTC 2021


On Wed, 10 Feb 2021 10:33:03 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Test hardcodes bufferedimage and frame bounds so it does not capture correct size if scaling factor is used.
> The solution is to always use the same uiscale=1, an updated test still can reproduce the JDK-8015085 issue without fix. Additionally, moved the frame to centre of screen for better mach5 stability.
> Mach5 job running for several iterations on all platforms is ok. Link in JBS.

test/jdk/javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java line 94:

> 92:         SwingUtilities.invokeAndWait(() -> frame.setVisible(true));
> 93:         robot.waitForIdle();
> 94:         robot.delay(1000);

Why do you need this delay and then one more in between the "test"?

test/jdk/javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java line 43:

> 41:  * @summary Shortening via " ... " is broken for Strings containing a combining
> 42:  *          diaeresis.
> 43:  * @run main/othervm -Dsun.java2d.uiScale=1 TestBadBreak

I missed the point why the hardcoded values do not work in this test, both frame and robot should take the coordinates in the user's space.

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

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


More information about the swing-dev mailing list