RFR: 8352149: Test java/awt/Frame/MultiScreenTest.java generates too many frames on Linux [v8]

Alexey Ivanov aivanov at openjdk.org
Wed Jun 4 19:09:54 UTC 2025


On Mon, 2 Jun 2025 09:33:34 GMT, Khalid Boulanouare <duke at openjdk.org> wrote:

>> Fixes issue in which the test fails when run on multi-screen machine.
>> 
>> Tested on Ubuntu 24.04, MacOS 15 and Windows 11
>> 
>> JTREG
>> 
>> runner starting test: java/awt/Frame/MultiScreenTest.java
>> runner finished test: java/awt/Frame/MultiScreenTest.java
>> Passed. Execution successful
>
> Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removes unnecessary lines and keep consistent code format

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/Frame/MultiScreenTest.java line 91:

> 89:                 .columns(40)
> 90:                 .testUI(obj::init)
> 91:                 .build()

Suggestion:

                .testUI(obj::init)
                .positionTestUI(MultiScreenTest::positionTestWindows)
                .build()


where


    private static void positionTestWindows(List<Window> testWindows,
                                            PassFailJFrame.InstructionUI instructionUI) {
        // Do nothing - the location of each window is set when they're created
    }

This allows keeping both created frames / windows `Screen#` and `DitherTest GC#` together for each screen.

Perhaps, such a null layout should be added as library method into [`WindowLayouts.java`](https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/regtesthelpers/WindowLayouts.java).

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

PR Review: https://git.openjdk.org/jdk/pull/24752#pullrequestreview-2897811132
PR Review Comment: https://git.openjdk.org/jdk/pull/24752#discussion_r2127258166


More information about the client-libs-dev mailing list