RFR [9] 8158525: Update a few java/net tests to use the loopback address instead of the host address
Roger Riggs
Roger.Riggs at Oracle.com
Thu Jun 2 13:37:05 UTC 2016
Hi Chris,
looks fine but a couple of questions/suggestions.
CookieManagerTest.java:
- the new definition of localHostAddr could probably be moved to a
class static and be used instead of the "127.0.0.1" literal (line 97).
- Does the use of the IPV4 loopback address work even in the case of
supporting only IPV6?
I'm not sure this is relevant to recent changes to support IPV6 only.
UnmodifiableMaps and HandleContentTypeWithAttrs:
- I assume that the lookup of localhost doesn't trigger the potential
timeouts to be avoided.
(Or 127.0.0.1 would have been used here too).
Roger
On 6/2/2016 9:22 AM, Chris Hegarty wrote:
> The following networking tests have been seen to fail from a timeout, when the host
> is not accessible. These tests have nothing whatsoever to do with testing of network
> connections, they simply want to test the HTTP client implementation. This issue
> proposes to change the tests from using the host's name/address to using the
> loopback, to make them more robust.
>
> test/java/net/CookieHandler/CookieManagerTest.java
> test/java/net/HttpURLConnection/UnmodifiableMaps.java
> test/java/net/URLConnection/HandleContentTypeWithAttrs.java
>
> http://cr.openjdk.java.net/~chegar/8158525/
> https://bugs.openjdk.java.net/browse/JDK-8158525
>
> -Chris.
More information about the net-dev
mailing list