On Wed, 18 Dec 2024 06:55:12 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> javax/swing/JScrollBar/4865918/bug4865918.java fails in CI citing
>> 
>> java.lang.RuntimeException: The scrollbar block increment is incorrect
>> at bug4865918.main(bug4865918.java:60) 
>> 
>> Seems like scrollbar is not in focus when mouse is pressed..Used 
>> CountDownLatch to mage focus gain more determinisitic.
>> Fix is passing in CI in several CI systems
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   import

Changes requested by aivanov (Reviewer).

test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 59:

> 57: 
> 58:             SwingUtilities.invokeAndWait(() -> sbar.pressMouse());
> 59:             mousePressLatch.await(2, TimeUnit.SECONDS);

Suggestion:

            if (!mousePressLatch.await(2, TimeUnit.SECONDS)) {
                throw new RuntimeException("Timed out waiting for mouse press");
            }


If you don't throw the exception, the test will continue to run… Yet we're sure 
it is likely to fail.

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

PR Review: https://git.openjdk.org/jdk/pull/22783#pullrequestreview-2511729351
PR Review Comment: https://git.openjdk.org/jdk/pull/22783#discussion_r1890179715

Reply via email to