RFR 8077402: JMXStartStopTest fails intermittently on slow hosts

Staffan Larsen staffan.larsen at oracle.com
Fri Apr 24 11:38:19 UTC 2015


I think this looks good. 

jtreg is not very good at cleaning up processes that are launched by a test since there are no APIs in Java to find these processes. However, such APIs are being added as part of JEP 102 and once present, jtreg will make use of them to try to clean up better.

/Staffan

> On 24 apr 2015, at 13:28, Jaroslav Bachorik <jaroslav.bachorik at oracle.com> wrote:
> 
> Please, review the following test change
> 
> Issue : https://bugs.openjdk.java.net/browse/JDK-8077402
> Webrev: http://cr.openjdk.java.net/~jbachorik/8077402/webrev.00
> 
> Currently, the test waits for 5*{timeout.factor} seconds for the target application to start up before timing out. On extremely slow machines even the timeout.factor will not assure a successful target application startup and the test will fail sporadically.
> 
> The proposed solution is to defer timing-out to the test harness. The test library will still take care of collecting the thread dump and terminating any left-over processes (ProcessTools.startProcess() methods). While this will not remedy the failures on extremely slow machines it is better not to introduce any additional arbitrary time-out limits.
> 
> As a part of this patch there is a small clarification in the javadoc of ProcessTools.startProcess() method and a null check in JMXStartStopTest$TestAppRun to prevent NPE hiding the timeout message.
> 
> Thanks,
> 
> -JB-



More information about the serviceability-dev mailing list