RFR: 8348299: Update List/ItemEventTest/ItemEventTest.java [v2]

Alexander Zvegintsev azvegint at openjdk.org
Thu Jan 23 13:26:46 UTC 2025


On Thu, 23 Jan 2025 11:09:23 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> With this changeset, I update the `java/awt/List/ItemEventTest/ItemEventTest.java` test to improve its stability and analysis of failures of the test.
>> 
>> 1. Use thread-safe `StringBuffer` for `actualSelectionOrder` to track selecting/deselecting items in the list.
>> 2. Enable `robot.setAutoWaitForIdle(true)` and remove `robot.waitForIdle()` from the test code.
>> 3. Log `handleEvent` and `ItemListener` which helps to identify test failures.  
>>     (In case of [JDK-8204221](https://bugs.openjdk.org/browse/JDK-8204221), `handleEvent` is never logged.)
>> 5. Take screenshot of the list on failure;  
>>     Optionally take screenshot after each mouse press+release if `-save` is passed as a parameter to the test.
>> 
>> The updated test passes.
>
> Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use setLength to reset actualSelectionOrder
>   
>   Co-authored-by: Aleksandr Zvegintsev <77687766+azvegint at users.noreply.github.com>

Marked as reviewed by azvegint (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/23238#pullrequestreview-2569858469


More information about the client-libs-dev mailing list