changeset 26338:dcfb4d3ce992

8056994: sun/tools/jstatd/TestJstatdPortAndServer.java and sun/tools/jstatd/TestJstatdServer.java miss correct check of RMI server availability Reviewed-by: jbachorik, dsamersoff
author ykantser
date Tue, 02 Sep 2014 11:05:41 +0200
parents 39f3ee5364e5
children 50d45d375866
files jdk/test/sun/tools/jstatd/JstatdTest.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/sun/tools/jstatd/JstatdTest.java	Tue Sep 02 05:48:55 2014 +0000
+++ b/jdk/test/sun/tools/jstatd/JstatdTest.java	Tue Sep 02 11:05:41 2014 +0200
@@ -148,11 +148,12 @@
     private OutputAnalyzer waitForJstatdRMI(ProcessBuilder pb) throws IOException, InterruptedException {
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
 
+        String remoteHost = (serverName != null) ? serverName : "JStatRemoteHost";
         while (output.getExitValue() != 0) {
             String out = output.getOutput();
 
             if (out.contains("RMI Registry not available") ||
-                out.contains("RMI Server JStatRemoteHost not available")) {
+                out.contains("RMI Server " + remoteHost + " not available")) {
                 Thread.sleep(100);
                 output = new OutputAnalyzer(pb.start());
             } else {