RFR: 8158801: [TEST_BUG] Mixing tests fail because of focus workaround trick [v38]

Alexey Ivanov aivanov at openjdk.org
Thu Sep 4 18:47:52 UTC 2025


On Thu, 4 Sep 2025 16:18:42 GMT, Khalid Boulanouare <duke at openjdk.org> wrote:

>> Many Mixing tests failed because the work around click lands on the minimizing area in the window control and causes the tests to fail.
>> 
>> This fix changes the width of base frames which allows most of tests to pass.
>
> Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removes MULTI_FRAME_TEST instance variable and cleans up code

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java line 29:

> 27: import java.awt.event.MouseEvent;
> 28: import java.awt.event.InputEvent;
> 29: import java.lang.reflect.InvocationTargetException;

`InvocationTargetException` is still required.

test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java line 98:

> 96:         return false;
> 97:     }
> 98:     /**

Suggestion:

    }

    /**

test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java line 44:

> 42: import test.java.awt.regtesthelpers.Util;
> 43: 
> 44: /**

I wonder if `frameBorderCounter` needs to run another java process to get the result. It should be possible to get the same result by running the code in `FrameBorderCounter` class directly in this JVM. Anyway, it's for another time.

test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 70:

> 68:     }
> 69: 
> 70:     protected boolean isMultiFramesTest(){

Suggestion:

    @Override
    protected boolean isMultiFramesTest(){

test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 73:

> 71:         return true;
> 72:     }
> 73:     public SimpleOverlappingTestBase() {

Suggestion:

    }

    public SimpleOverlappingTestBase() {


Ensure there's a blank line around method declarations. (For modified / added methods.)

test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 173:

> 171:                 if (!await) {
> 172:                     throw new RuntimeException("Ancestor frame didn't receive " +
> 173:                             "focus");

Suggestion:

                    throw new RuntimeException("Ancestor frame didn't receive focus");


I'm for breaking the rule of fitting into 80-column limit, wrapping this line doesn't improve readability.

test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 179:

> 177:             }
> 178: 
> 179:         }

Suggestion:

            }
        }

There shouldn't be a blank line between the closing braces.

test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 184:

> 182:             if (ancestor != null && isMultiFramesTest()) {
> 183:                 ancestor.dispose();
> 184:             }

These four lines are indented inconsistently, the indentation should be reduced by four spaces.

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

PR Review: https://git.openjdk.org/jdk/pull/25971#pullrequestreview-3186560693
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323061545
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323055693
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323082284
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323088480
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323091314
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323097562
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323102374
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2323106519


More information about the client-libs-dev mailing list