Hi,
When I run the updated test case I got this error in the log[1].
You will need to rethrow all exception from the catch block, instead of
printStackTrace
[1]
java.lang.IllegalThreadStateException: Cannot call method from the event
dispatcher thread
at java.awt.Robot.checkNotDispatchThread(Robot.java:573)
at java.awt.Robot.waitForIdle(Robot.java:552)
at bug5012888.doTest(bug5012888.java:55)
at bug5012888$2.run(bug5012888.java:76)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
>
> Hi All,
>
> Please review the test bug fix for JDK-8169958 :
> javax/swing/JSpinner/5012888: Spinner value should be more than 1.
>
> Issue:
> In this bug, click & hold on arrow of JSpinner only transfers focus and does
> not change spinner value. This behavior is intermittently seen in the
> automated test but is working as expected when checked for manualy. The test
> was failing robot clicks out of sync with the yet to be maximized frame.
>
> Fix:
> Ensure the robot waits for the frame to be maximized before the clicks on the
> Spinner. Also ensure the main application frame is maximized explicitly.
>
> Testing:
> Tested the potential fix on winx64, linux with JDK8, 9 several times with
> running tests individually clubbed with the previous test and the entire
> suite (i.e javax/swing) put to ensure that the issue is not repeated.
>
> Bug Id:
> https://bugs.openjdk.java.net/browse/JDK-8169958
> <https://bugs.openjdk.java.net/browse/JDK-8169958>
>
>
> WebRev Request:
> http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.00/
> <http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.00/>
>
>
> Regards,
> Srinivas M