Integrated: 8348299: Update List/ItemEventTest/ItemEventTest.java
Alexey Ivanov
aivanov at openjdk.org
Thu Jan 23 15:22:01 UTC 2025
On Wed, 22 Jan 2025 16:45:17 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.
This pull request has now been integrated.
Changeset: 605b53e4
Author: Alexey Ivanov <aivanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/605b53e4f8857c58a72fa361f8787c563d6dab90
Stats: 98 lines in 1 file changed: 44 ins; 8 del; 46 mod
8348299: Update List/ItemEventTest/ItemEventTest.java
Use thread-safe StringBuffer to track selecting/deselecting items.
Use auto waitForIdle for all events.
Log handleEvent and ItemListener.
Take screenshot of the list on failure;
Optionally take screenshot after each mouse press+release.
Reviewed-by: azvegint, prr, kizune
-------------
PR: https://git.openjdk.org/jdk/pull/23238
More information about the client-libs-dev
mailing list