RFR: 8296632: Write a test to verify the content change of TextArea sends TextEvent. [v4]

Alexey Ivanov aivanov at openjdk.org
Thu Nov 17 11:30:57 UTC 2022


On Wed, 16 Nov 2022 19:58:27 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> test/jdk/java/awt/event/ComponentEvent/TextAreaTextEventTest.java line 72:
>> 
>>> 70: 
>>> 71:             typeKey(KeyEvent.VK_T);
>>> 72: 
>> 
>> In theory the autoWaitForIdle should ensure that events are processed. We'll see.
>> If you find otherwise then here (and after typing the Enter key) it might be safer to do an additional robot.delay(500);
>> You want to give every chance to process these events.
>
> Tested it locally on Win10. Works as expected. I agree with @prrace, adding additional delay would make sure that all events are processed.

Without explicit `Robot.waitForIdle()` calls, the test looks as if something's missing. Adding it explicitly before checking a condition gives more confidence, the test has waited for the events to be processed.

-------------

PR: https://git.openjdk.org/jdk/pull/11052



More information about the client-libs-dev mailing list