On Wed, 12 Jun 2024 06:58:54 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> Here is a trivial change that might fix intermittent failures in the test 
>> java/net/httpclient/whitebox/SSLTubeTestDriver.java.
>> The change makes sure the client connects using the loopback address instead 
>> of "localhost".
>> 
>> In case that does not fix the issue, some additional logging has been added 
>> to try to understand what's going on.
>
> test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SSLTubeTest.java
>  line 149:
> 
>> 147:                 }
>> 148:             } catch (Throwable e) {
>> 149:                 System.out.println("clientReader got exception: " + e);
> 
> Hello Daniel, I think since we are printing the stacktrace on the next line, 
> it might be better to use `System.err.println` here so that this message to 
> ends up in the `System.err` section like the stacktrace. Same suggestion for 
> 2 more places in this PR where we are introducing such messages in the 
> Throwable block.

I wanted to print this on System.out by design - to avoid the trace being lost 
among the many debug traces on System.err. What I'm interested mostly here is 
knowing whether the thread exited normally or with an error.
If you believe it's important enough I believe we could write both on 
System.out and System.err, but I specifically wanted it on System.out.

> test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SSLTubeTest.java
>  line 219:
> 
>> 217:                         os.close();
>> 218:                         serverSock.close();
>> 219:                         System.out.println("serverLooback exiting 
>> normally");
> 
> Typo in the message, should have been `serverLoopback ...`. Same in 1 other 
> place.

will fix

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19663#discussion_r1636247003
PR Review Comment: https://git.openjdk.org/jdk/pull/19663#discussion_r1636247095

Reply via email to