RFR: JDK-8314246: javax/swing/JToolBar/4529206/bug4529206.java fails intermittently on Linux [v2]
Alexey Ivanov
aivanov at openjdk.org
Wed Oct 18 11:50:10 UTC 2023
On Wed, 16 Aug 2023 23:46:09 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> Oh, I didn't notice that `setAutoWaitForIdle()` was not used the first time. I have changed it. I think adding a small amount of delay after `makeToolbarFloat()` is good in addition to `setAutoWaitForIdle()` to stabilize the test on slower systems.
I think this was a bad decision: now the test **never** calls `waitForIdle()`. But it should do it… for stability… after it takes any action.
This test does not use `Robot` to send any events, but `robot.setAutoWaitForIdle(true)` affects only *mouse and keyboard events*: [`Robot.autoWaitForIdle()`](https://github.com/openjdk/jdk/blob/6fc35142315f1616fa35e415005c9483939c6920/src/java.desktop/share/classes/java/awt/Robot.java#L688) is called from `afterEvent`, just like `autoDelay`:
https://github.com/openjdk/jdk/blob/6fc35142315f1616fa35e415005c9483939c6920/src/java.desktop/share/classes/java/awt/Robot.java#L662-L665
I submitted [JDK-8318423](https://bugs.openjdk.org/browse/JDK-8318423): Add explicit robot.waitForIdle to JToolBar/4529206/bug4529206.java
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15316#discussion_r1363726279
More information about the client-libs-dev
mailing list