RFR 8057149: sun/management/jmxremote/startstop/JMXStartStopTest.java fails with "Starting agent on port ... should report port in use"

Staffan Larsen staffan.larsen at oracle.com
Tue Sep 23 18:20:56 UTC 2014


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.bachorik at 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-



More information about the serviceability-dev mailing list