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

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Jul 18 04:03:47 UTC 2025


On Thu, 17 Jul 2025 17:04:25 GMT, Khalid Boulanouare <duke at openjdk.org> wrote:

> In Windows machines, the click lands on the reduce control of the window, and this causes the windows to be iconified and the test fails.

WHich test in particular? or is it all tests have this behavior?

> The test needs to click on the middle of the Windows title bar (Outside of the controls) to pass.

I tried JMenuBarOverlapping.java but I dont see any click on title bar..The cursor in on top-left of "Test Menu" menu..
If clicking on the title bar is needed to make it gain focus, probably you can try with calling `frame.requestFocus` and use `CountDownLatch `with timeout to wait till FOCUS_GAINED event is received and release the latch in `focusGained()` and then start the test

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

PR Comment: https://git.openjdk.org/jdk/pull/25971#issuecomment-3086636739


More information about the client-libs-dev mailing list