8174915: Improve error handing for Jdp tests under sun/management/jdp

Added checks for abnormal exits of spawn process by test cases

Reviewed-by: dholmes, dfuchs, sspitsyn
This commit is contained in:
Amit Sapre 2017-02-21 17:33:08 +05:30 committed by Amit Sapre
parent 1fa4d6038d
commit a712ebbffb
2 changed files with 5 additions and 1 deletions

View File

@ -58,6 +58,11 @@ public abstract class DynamicLauncher {
}
}
} while (tryAgain);
output.shouldHaveExitValue(0);
// java.lang.Exception is thrown by JdpTestCase if something goes wrong
// for instance - see JdpTestCase::shutdown()
output.shouldNotContain("java.lang.Exception:");
output.shouldNotContain("Error: Could not find or load main class");
}
protected OutputAnalyzer runVM() throws Exception {

View File

@ -40,7 +40,6 @@ public class JdpJmxRemoteDynamicPortTest extends DynamicLauncher {
public static void main(String[] args) throws Exception {
DynamicLauncher launcher = new JdpJmxRemoteDynamicPortTest();
launcher.run();
launcher.getProcessOutpoutAnalyzer().stderrShouldNotContain("java.lang.Exception:");
}
protected String[] options() {