On Fri, 7 Nov 2025 19:41:32 GMT, Alexey Ivanov <[email protected]> wrote:
>> I referred to the original JBS issue for which this test was created - >> [JDK-4759934](https://bugs.openjdk.org/browse/JDK-4759934). Looks like we >> can use doClick() instead of using Robot for the clicks. >> >> But the problem is that when we use doClick() for frameBtn and dialogBtn, >> JFC's click on Cancel button doesn't happen and the test fails due to >> timeout. This happens on macOS26, I have to test on other platforms. >> >> >> >> SwingUtilities.invokeAndWait(() -> frameBtn.doClick()); >> robot.waitForIdle(); >> robot.delay(500); >> >> SwingUtilities.invokeAndWait(() -> dialogBtn.doClick()); >> robot.waitForIdle(); >> robot.delay(500); >> >> SwingUtilities.invokeAndWait(() -> { >> JButton cancelBtn = findCancelButton(jfc); >> cancelBtn.doClick(); >> }); >> robot.delay(500); > > I see… It may be not worth the effort then. > > However, this behaviour — clicking the Cancel button doesn't happen — could > be a bug. > > Why does the test time out? Even if clicking the Cancel button didn't work, > the test should finish with a failure. I believe the test hangs at that point - cancelBtn.doClick() and does not proceed to the test condition check. I'll need to check in depth as to why this is happening. > I see… It may be not worth the effort then. I can create a separate JBS issue to look into it and as for the test changes use the doClick() for just the JFC's Cancel button. Does this sound good to you? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28169#discussion_r2505248035
