diff --git a/jdk/test/sun/tools/jstatd/JstatdTest.java b/jdk/test/sun/tools/jstatd/JstatdTest.java index 5d01eb2397d..9cb1f60561e 100644 --- a/jdk/test/sun/tools/jstatd/JstatdTest.java +++ b/jdk/test/sun/tools/jstatd/JstatdTest.java @@ -148,11 +148,12 @@ public final class JstatdTest { 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 {