<Swing Dev> [10][TESTBUG]: Review Request for JDK-8169958 : javax/swing/JSpinner/5012888: Spinner value should be more than 1

Sergey Bylokhov sergey.bylokhov at oracle.com
Wed Jul 5 14:34:15 UTC 2017


Looks fine.

----- srinivas.mandalika at oracle.com wrote:

> Hi Sergey,
> 
> I have modified the code as per the comments. 
> Updated Webrev: 
> http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.03/
> 
> 
> Thanks
> Srinivas M
> 
> 
> -----Original Message-----
> From: Sergey Bylokhov 
> Sent: Tuesday, July 4, 2017 12:08 AM
> To: Srinivas Mandalika <srinivas.mandalika at oracle.com>
> Cc: swing-dev at openjdk.java.net
> Subject: Re: <Swing Dev> [10][TESTBUG]: Review Request for JDK-8169958
> : javax/swing/JSpinner/5012888: Spinner value should be more than 1
> 
> Hi,
> There is a small issue in the logic of the test.
> An access to the Swing component should be done on EDT, so this
> commands should be wrapped in InvokeAndWait:
>   Point p = spinner2.getLocationOnScreen();
>   Rectangle rect = spinner2.getBounds();
> 
> And code related to robot is not necessary to call on EDT:
> robot.mouseMove(p.x + rect.width - 5, p.y + 5); This can be used
> without InvokeAndWait, in the same way as others robot.xx()
> 
> 
> ----- srinivas.mandalika at oracle.com wrote:
> 
> > Hi All,
> > Please let me know if there are any other comments on this issue.
> > 
> > Updated webrev:
> > http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.02/
> > 
> > 
> > Regards
> > Srinivas M
> > 
> > -----Original Message-----
> > From: Srinivas Mandalika
> > Sent: Thursday, June 22, 2017 9:36 AM
> > To: Sergey Bylokhov <sergey.bylokhov at oracle.com>; 
> > swing-dev at openjdk.java.net
> > Subject: Re: <Swing Dev> [10][TESTBUG]: Review Request for
> JDK-8169958
> > : javax/swing/JSpinner/5012888: Spinner value should be more than 1
> > 
> > Hi Sergey,
> > 
> > I have added the change for the frame being disposed in both the
> test 
> > pass/fail conditions.
> > Please note that this fix is now targeted for jdk10 and has been 
> > tested on it as well.
> > 
> > Updated webrev:
> > http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.02/
> > 
> > 
> > Regards,
> > Srinivas M
> > 
> > -----Original Message-----
> > From: Sergey Bylokhov
> > Sent: Monday, June 19, 2017 9:03 PM
> > To: Srinivas Mandalika <srinivas.mandalika at oracle.com>
> > Cc: Ajit Ghaisas <ajit.ghaisas at oracle.com>;
> swing-dev at openjdk.java.net
> > Subject: Re: <Swing Dev> [9][TESTBUG]: Review Request for
> JDK-8169958
> > : javax/swing/JSpinner/5012888: Spinner value should be more than 1
> > 
> > Hi, Srinivas.
> > You will need to dispose the frame at the end of the test(when the 
> > test fails or pass).
> > > 
> > > Hi Ajit,
> > > 
> > > Thank you for your comments. I have incorporated all your
> comments. 
> > There are also a few additional changes of invoking code on EDT that
> I 
> > made while executing this fix to validate the test stability.
> > > 
> > > Updated webrev:
> > http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.01/
> > > 
> > > 
> > > Thanks,
> > > Srinivas M
> > > 
> > > -----Original Message-----
> > > From: Ajit Ghaisas
> > > Sent: Monday, June 12, 2017 2:41 PM
> > > To: Srinivas Mandalika <srinivas.mandalika at oracle.com>;
> > swing-dev at openjdk.java.net
> > > Subject: RE: <Swing Dev> [9][TESTBUG]: Review Request for
> > JDK-8169958 : javax/swing/JSpinner/5012888: Spinner value should be
> 
> > more than 1
> > > 
> > > Hi Srinivas,
> > > 
> > >   Here are few review comments :
> > >   1.  Add this bug id to the @bug jtreg tag in test
> > >   2. Replace generic import statements with specific ones
> > >   3. You are calling - b.doTest(); - in a try catch block. This
> will
> > catch any exception and print stack trace. 
> > >       I think we can remove this try-catch block - simply make a
> > call to b.doTest(), if an exception is thrown, it is thrown out
> from
> > main() and jtreg framework will catch it and mark the test as
> failed.
> > >   4. Line 63 in your file has a throw error - this can be
> converted
> > to exception.
> > >   5. Keep four spaces indentation level
> > > 
> > > Regards,
> > > Ajit
> > > 
> > > 
> > > From: Srinivas Mandalika
> > > Sent: Monday, June 12, 2017 1:51 PM
> > > To: swing-dev at openjdk.java.net
> > > Subject: <Swing Dev> [9][TESTBUG]: Review Request for JDK-8169958
> :
> > javax/swing/JSpinner/5012888: Spinner value should be more than 1
> > > 
> > > 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
> > > 
> > > 
> > > WebRev Request:
> > > http://cr.openjdk.java.net/~akolarkunnu/8169958/webrev.00/
> > > 
> > > 
> > > Regards,
> > > Srinivas M



More information about the swing-dev mailing list