Hi, Srinivas. A few comments: * bug8021253.java: - You should not delete this lone "74 robot.waitForIdle()» because it is waits while the previous clicks are executed, w/o this line you can get a situation when defaultKeyPressed will be false because the code on EDT is in progress. - Do not use JRobot if it is not strictly necessary because this additional dependency will make harder to run the test standalone, w/o jtreg. * bug7199708.java: - Always rethrow an exception instead of e.printStackTrace(); - I am not sure that SwingTestHelper is necessary here, it was useful while java had no lamda, so the code was quite long when we executed a number or «InvokeAndWait», but now it should be compact.(Even in the current code it is visible that after the fix the code became longer). - Please confirm that the test still fails before 7199708 was fixed. - The new line «85» is too long please split it to fit 80 chars per line. - Please add a code to dispose the frame after test execution.
> Hi All, > > Please review the test bug fix for JDK-8169954 : JFileChooser/8021253: > java.lang.RuntimeException: Default button is not pressed. > > Issue: > The Test under 8021253 is opening up a filechooser iconified, causing a > failure to hit Enter key on the filechooser. Test failure is intermittent and > more pronounced when run along with the entire javax/swing suite. > > Fix: > This is occurring due to synchronization issues in the previous test 7199708. > The test for bug 7199708 checks if the filechooser can load up a large number > of files without a crash. In doing so it also tries to sort the columns of > the filechooser via Robot mouse move and click actions. > Commenting out these robot actions ensured that the next test 8021253 was > passing indicating that this was a problem of with synchronization of the > filechooser UI sorting and disposal of filechooser and that root cause was > that these were not synchronized properly. Hence fixed the code flow using > the regtesthelpers classes, to ensure that this is working correctly now. > Also ensured the filechooser of test 8021253 is not opened iconified and has > focus. > > 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-8169954 > <https://bugs.openjdk.java.net/browse/JDK-8169954> > > WebRev Request: > http://cr.openjdk.java.net/~akolarkunnu/8169954/webrev.00/ > <http://cr.openjdk.java.net/~akolarkunnu/8169954/webrev.00/> > > > Regards, > Srinivas M