I think we should add some logging to say that we are retrying. nit: some weird indention on line 623.
Otherwise looks good. /Staffan On 23 sep 2014, at 17:59, Jaroslav Bachorik <jaroslav.bacho...@oracle.com> wrote: > Please, review this test change > > Issue : https://bugs.openjdk.java.net/browse/JDK-8057149 > Webrev: http://cr.openjdk.java.net/~jbachorik/8057149/webrev.00 > > The test is using 'jcmd' to start/stop the JMX agent dynamically with various > parameters. Some of the tests use a server socket to simulate starting the > agent with the desired port not being available. However, it seems that in > certain situations the agent does not provide a conscious error message and > fails with RuntimeException instead. This seems to be timing related and > therefore the solution is to retry the 'jcmd' command a few times with a > delay to provide some cushion for the timing related problems. > > Thanks, > > -JB-