[teststabilization] RFR: 8226756: Replace wildcard address with loopback or local host in tests - part 18

Daniel Fuchs daniel.fuchs at oracle.com
Thu Jul 4 14:19:47 UTC 2019


Hi Patrick,

Good to see more tests cleaned up!
Also good to see that you fixed some tests missing their @test line:
these were never run previously I gather...

On a general comment - I tend to prefer using the no arg constructor
for ServerSocket, and then call the bind() method. That avoids having
to figure out what the `backlog` 0 value means and whether it's the
right value to pass (just a nit).

URLConnection/SetIfModifiedSince.java:

I believe main should be modified to throw Exception, and line
   97         } catch (Exception e) {
should be removed. Or else, if an exception is expected
(which might very well be the case) then the exact type
of exception should be caught and a message should be
printed saying something like:

    System.out.println("Caught expected exception: " + x);

I believe this one needs a little more work before it can be pushed.

sun/net/www/protocol/http/NoCache.java:

   51                     .host(InetAddress.getLocalHost())

You could use:

   51                     .host(server.getAddress().getAddress())

here to be consistent with the following line.


Otherwise looks good!

cheers,

-- daniel

On 04/07/2019 15:07, Patrick Concannon wrote:
> Hi,
> 
> Would it be possible to have my fix for JDK-8226756 reviewed?
> 
> This test is a part of the Network Stabilization Test Set: Replace 
> wildcard address with loopback or local host in tests - part 18.
> Further information on fixes can be found here: 
> https://bugs.openjdk.java.net/browse/JDK-8226756
> 
> 
> Webrev for fix: http://cr.openjdk.java.net/~aefimov/pconcann/8226756/00/
> 
> 
> Kind regards,
> Patrick
> 



More information about the net-dev mailing list