diff --git a/jdk/test/sun/management/jdp/DynamicLauncher.java b/jdk/test/sun/management/jdp/DynamicLauncher.java index 934002c056b15f56ec4a2db344a35eb29f6c738e..f55d0c8b671349963f3272fb08870b1955f7b75c 100644 --- a/jdk/test/sun/management/jdp/DynamicLauncher.java +++ b/jdk/test/sun/management/jdp/DynamicLauncher.java @@ -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 { diff --git a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java index d79e2245870ef1c7dbcf07864a7d4b23a8903432..993cf930846eaa188e7a41458e218c1cbad57649 100644 --- a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java +++ b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java @@ -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() {