test/jdk/java/net/httpclient/http2/BasicTest.java
branchhttp-client-branch
changeset 56265 ec34ae013fbe
parent 56167 96fa4f49a9ff
child 56369 24a8fafec3ff
--- a/test/jdk/java/net/httpclient/http2/BasicTest.java	Thu Mar 08 17:41:52 2018 +0000
+++ b/test/jdk/java/net/httpclient/http2/BasicTest.java	Thu Mar 08 17:42:16 2018 +0000
@@ -76,9 +76,9 @@
             httpsServer.addHandler(new Http2EchoHandler(), "/");
 
             httpsPort = httpsServer.getAddress().getPort();
-            httpURIString = "http://127.0.0.1:" + httpPort + "/foo/";
-            pingURIString = "http://127.0.0.1:" + httpPort + "/ping/";
-            httpsURIString = "https://127.0.0.1:" + httpsPort + "/bar/";
+            httpURIString = "http://localhost:" + httpPort + "/foo/";
+            pingURIString = "http://localhost:" + httpPort + "/ping/";
+            httpsURIString = "https://localhost:" + httpsPort + "/bar/";
 
             httpServer.start();
             httpsServer.start();
@@ -229,7 +229,7 @@
                 t.sendResponseHeaders(500, -1);
             }
         }), "/");
-        URI u = new URI("https://127.0.0.1:"+httpsPort+"/foo");
+        URI u = new URI("https://localhost:"+httpsPort+"/foo");
         HttpClient client = getClient();
         HttpRequest req = HttpRequest.newBuilder(u).build();
         HttpResponse<String> resp = client.send(req, BodyHandlers.ofString());