RFR: 8169475 : WheelModifier.java fails by timeout [v3]

Alexey Ivanov aivanov at openjdk.org
Wed Oct 25 15:20:34 UTC 2023


On Wed, 25 Oct 2023 03:23:01 GMT, Renjith Kannath Pariyangad <duke at openjdk.org> wrote:

>> Hi Reviewers,
>> 
>> I have added additional CountDownLatch for making sure button is visible before proceeding,(observe this was one of the key reason for failure) so this helps to improve test case stability. Modified _await()_ function by adding 1sec timeout with exception, this will help to reduce total execution time in case of failure. 
>> Please review and let me know your suggestions, if any.
>
> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Suggestions integrated

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line 175:

> 173:             if (test.f != null) {
> 174:                 SwingUtilities.invokeAndWait(test.f::dispose);
> 175:             }

This is still not *thread-safe*, you've missed the suggested changes: the `null`-check must also be inside `invokeAndWait`:
Suggestion:

            SwingUtilities.invokeAndWait(() -> {
                if (test.f != null) {
                   test.f.dispose();
               }
            });

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

PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1697655892
PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1371943516


More information about the client-libs-dev mailing list