8056994: sun/tools/jstatd/TestJstatdPortAndServer.java and sun/tools/jstatd/TestJstatdServer.java miss correct check of RMI server availability
Reviewed-by: jbachorik, dsamersoff
--- 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 {