RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2]
Phil Race
prr at openjdk.java.net
Wed Apr 27 18:14:45 UTC 2022
On Wed, 20 Apr 2022 13:28:17 GMT, Manukumar V S <mvs at openjdk.org> wrote:
>> These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI.
>> 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java
>> 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java
>> 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java
>>
>> Issue :
>> These tests are using the Util.drag() method and there was no robot.delay() added between different mouse actions in this method. This could potentially make tests using this method unstable.
>>
>> Fix:
>> Adding a small auto delay of 100ms to fix this.
>>
>> Testing:
>> 1. All the three tests are run 15 times per platform.
>> 2. All the tests in java/awt/dnd package run 5 times per platform
>> 3. All the three tests are run 5 times specifically on Windows 11 platform.
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
>
> Added blank line at end of file
test/jdk/java/awt/regtesthelpers/Util.java line 325:
> 323: robot.setAutoDelay(100);
> 324: autoDelaySet = true;
> 325: }
If this is the right place to fix it - in the Util class - then you can just call delay(100) in the places you need it - no need to set and then unset auto-delay.
Changing Util you will need to re-validate all tests that use this utility method.
Based on the explanation you gave ~mrserb I wonder if the test should also be waiting for the drop before disposing, not just throwing an arbitrary wait into the mix.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8316
More information about the client-libs-dev
mailing list