On Fri, 30 May 2025 13:42:08 GMT, Anass Baya <ab...@openjdk.org> wrote:
>>> > However, the CountDownLatch is currently set to 1, which means the test >>> > only waits for the first open/close interaction to complete. As a result, >>> > it does not wait for the second attempt (opening the dialog again and >>> > pressing ESC to close it), because the latch reaches zero after the first >>> > attempt. >>> > This causes the test to proceed immediately to the validation step: >>> > if (fd.isVisible()) { >>> > throw new RuntimeException("File Dialog is not closed"); >>> > } >>> >>> I don't see the existing code ignores the second attempt, that is due to >>> longer delay put after the robot operations. You can add print statements >>> and observe the behavior. >>> >>> However, I agree the countdown latch should be initialize to 2 to behave >>> correctly. >> >> Technically, longer delays do add up, yet if it takes longer to display the >> dialog and hide it, it's well possible that the dialog isn't hidden by the >> time the main thread reaches the point where it calls `fd.isVisible()`. > > Hello @aivanov-jdk, > I also added the test DoubleActionESCWithGtkDisabled to ensure that the old > fix is still working @anass-baya You could have made the changes under single commit and pushed. No need to add multiple commits. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25184#issuecomment-2923128668