Jaroslav, Dmitry, thank you for your reviews!

Jaroslav, could you please be my sponsor and push the fix? The patch is 
attached to this mail and includes Dmitry's suggestion for syntax.

Thanks,
Katja



----- Original Message -----
From: [email protected]
To: [email protected]
Cc: [email protected]
Sent: Monday, September 1, 2014 4:13:17 PM GMT +01:00 Amsterdam / Berlin / Bern 
/ Rome / Stockholm / Vienna
Subject: Re: RFR(XS): 8056994: sun/tools/jstatd/TestJstatdPortAndServer.java 
and sun/tools/jstatd/TestJstatdServer.java miss correct check of RMI server 
availability

Reviewed!

-JB-

On 09/01/2014 04:09 PM, Yekaterina Kantserova wrote:
> Please find the updated webrev here:
> http://cr.openjdk.java.net/~ykantser/8056994/webrev.01/
>
> Thanks,
> Katja
>
>
>
> On 09/01/2014 03:47 PM, Jaroslav Bachorik wrote:
>> Hi Katja,
>>
>> On 09/01/2014 02:04 PM, Yekaterina Kantserova wrote:
>>> Hi,
>>>
>>> Could I please have a review of this small fix.
>>>
>>> webrev: http://cr.openjdk.java.net/~ykantser/8056994/webrev.00/
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8056994
>>
>> I would recommend moving the code from L154-157 before the start of
>> the while loop and simplify it with
>> `String remoteHost = serverName != null ? serverName : "JStatRemoteHost"`
>>
>> Cheers,
>>
>> -JB-
>>
>>>
>>> Thanks,
>>> Katja
>>>
>>
>

# HG changeset patch
# User ykantser
# Date 1409648741 -7200
#      Tue Sep 02 11:05:41 2014 +0200
# Node ID 8f06b83788f0e6630b4dec9d59c5554444a8a01d
# Parent  b1ad730c120a6dd00867d3e8cf152bb36889aab0
8056994: sun/tools/jstatd/TestJstatdPortAndServer.java and sun/tools/jstatd/TestJstatdServer.java miss correct check of RMI server availability
Reviewed-by: jbachorik, dsamersoff

diff -r b1ad730c120a -r 8f06b83788f0 test/sun/tools/jstatd/JstatdTest.java
--- a/test/sun/tools/jstatd/JstatdTest.java	Tue Sep 02 05:48:55 2014 +0000
+++ b/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 {

Reply via email to