8056994: sun/tools/jstatd/TestJstatdPortAndServer.java and sun/tools/jstatd/TestJstatdServer.java miss correct check of RMI server availability
Reviewed-by: jbachorik, dsamersoff
This commit is contained in:
parent
e0e332bdac
commit
2905bd08a6
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user