RFR: 8295774 : Write a test to verify that List Item selection events. [v2]
Alexey Ivanov
aivanov at openjdk.org
Wed Nov 2 11:20:30 UTC 2022
On Wed, 2 Nov 2022 04:12:44 GMT, ravi gupta <duke at openjdk.org> wrote:
>> test/jdk/java/awt/event/ComponentEvent/ListItemEventsTest.java line 140:
>>
>>> 138: }
>>> 139:
>>> 140: robot.setAutoDelay(waitDelay);
>>
>> Why is delay increased here?
>
> This test verifies list section via mouse/keys events.
>
> For mouse events, robot.setAutoDelay(100) worked well. But for key events there were a few intermittent failures which cleared out with a higher delay via robot.setAutoDelay(1000)
I see. Would it be clearer if you have two constants:
private static final int MOUSE_DELAY = 100;
private static final int KEYBOARD_DELAY = 1000;
Then you would set the former initially and, before testing with key events, you would change to the latter. It'll make the intention much clearer and explain why it's changed.
-------------
PR: https://git.openjdk.org/jdk/pull/10899
More information about the client-libs-dev
mailing list