On Fri, 29 Sep 2023 05:05:07 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> Test was run without waiting for UI to be made visible leading to >> IllegalComponentStateException. >> Used robot.delay consistent with other headful tests to made the test wait >> after UI is created and shown. >> >> Test passed in several iterations in all platforms. Link in JBS > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Add setAutoWaitForIdle test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 83: > 81: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); > 82: robot.waitForIdle(); > 83: robot.delay(250); These don't help on the system I have tested on. There's something else going on. The test is basically about verifying that clicking on a disabled menu item doesn't dismiss the menu. I don't think it does. If I comment out the press/release the same exception occurs. And visually you can see the menu disappear and then reappear. What it looks like is that the call at line 86/91 to mouseMove which returns the pointer to the "menu" location causes the list of menu items to disappear and then quickly reappear. Sampling if the menu is on screen at that time will cause the error. It only happens once .. very odd .. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1344761217