RFR: 8282771 : Create test case for JDK-8262981 [v2]

Alexandre Iline shurailine at openjdk.java.net
Wed Mar 9 21:46:43 UTC 2022


On Tue, 8 Mar 2022 05:10:51 GMT, lawrence.andrews <duke at openjdk.java.net> wrote:

>> Following methods are covered in this testcase
>> getAccessibleAction()
>> getAccessibleActionCount()
>> getAccessibleActionDescription()
>> doAccessibleAction(int direction) 
>> 
>> @shurymury
>
> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added command after the date

test/jdk/javax/swing/JSlider/8262981/JSliderAccessibleAction.java line 264:

> 262:                             "Increment button");
> 263:                 }
> 264:                 if (jSliderInitialValue.get() != currentJSliderValue.get()) {

This is  fundamentally unstable. 

You are clicking on the decrease button. The actual decrease which happened in the slider after the click may be more than you expect. Or less. 

The only reliable condition perhaps is that the value has decreased and even that may have a delayed effect, so it needs to be waited for. 

For example see  sanity/client/SwingSet/src/SliderDemoTest.java.

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

PR: https://git.openjdk.java.net/jdk/pull/7734



More information about the client-libs-dev mailing list