changeset 13331:7c94f332ea1c

8145417: JInfoSanityTest failed with Error attaching to remote server: java.rmi.ConnectException: Connection refused Reviewed-by: sspitsyn
author jbachorik
date Fri, 18 Dec 2015 14:43:24 +0100
parents 86e5434d384b
children f90cd2c011bc
files test/sun/tools/jinfo/JInfoSanityTest.java test/sun/tools/jps/TestJpsSanity.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/tools/jinfo/JInfoSanityTest.java	Fri Dec 18 09:59:25 2015 +0100
+++ b/test/sun/tools/jinfo/JInfoSanityTest.java	Fri Dec 18 14:43:24 2015 +0100
@@ -71,7 +71,7 @@
         String unknownHost = "Oja781nh2ev7vcvbajdg-Sda1-C";
         OutputAnalyzer output = JInfoHelper.jinfoNoPid("med@" + unknownHost);
         assertNotEquals(output.getExitValue(), 0, "A non-zero exit code should be returned for invalid operation");
-        output.shouldContain("UnknownHostException: " + unknownHost);
+        output.shouldMatch(".*(Connection refused to host\\:|UnknownHostException\\:) " + unknownHost + ".*");
     }
 
 }
--- a/test/sun/tools/jps/TestJpsSanity.java	Fri Dec 18 09:59:25 2015 +0100
+++ b/test/sun/tools/jps/TestJpsSanity.java	Fri Dec 18 14:43:24 2015 +0100
@@ -62,7 +62,7 @@
         OutputAnalyzer output = JpsHelper.jps(invalidHostName);
         Asserts.assertNotEquals(output.getExitValue(), 0, "Exit code shouldn't be 0");
         Asserts.assertFalse(output.getStderr().isEmpty(), "Error output should not be empty");
-        output.shouldContain("Unknown host: " + invalidHostName);
+        output.shouldMatch(".*(RMI Registry not available at|Unknown host\\:) " + invalidHostName + ".*");
     }
 
 }