# HG changeset patch # User chegar # Date 1523627962 -3600 # Node ID 9236d0fb75b9e7866e8b142515f0b520c9d11025 # Parent c6fe988dca4ccd60a8c1162734dfa9dd90bfee52 http-client-branch: review comment - a few more test should explicitly set no proxy diff -r c6fe988dca4c -r 9236d0fb75b9 test/jdk/java/net/httpclient/EncodedCharsInURI.java --- a/test/jdk/java/net/httpclient/EncodedCharsInURI.java Fri Apr 13 14:54:02 2018 +0100 +++ b/test/jdk/java/net/httpclient/EncodedCharsInURI.java Fri Apr 13 14:59:22 2018 +0100 @@ -88,6 +88,7 @@ import static java.lang.System.in; import static java.lang.System.out; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.net.http.HttpClient.Builder.NO_PROXY; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; @@ -209,6 +210,7 @@ clientCount.incrementAndGet(); return HttpClient.newBuilder() .executor(executor) + .proxy(NO_PROXY) .sslContext(sslContext) .build(); } diff -r c6fe988dca4c -r 9236d0fb75b9 test/jdk/java/net/httpclient/EscapedOctetsInURI.java --- a/test/jdk/java/net/httpclient/EscapedOctetsInURI.java Fri Apr 13 14:54:02 2018 +0100 +++ b/test/jdk/java/net/httpclient/EscapedOctetsInURI.java Fri Apr 13 14:59:22 2018 +0100 @@ -65,6 +65,7 @@ import org.testng.annotations.Test; import static java.lang.System.out; import static java.nio.charset.StandardCharsets.US_ASCII; +import static java.net.http.HttpClient.Builder.NO_PROXY; import static org.testng.Assert.assertEquals; public class EscapedOctetsInURI { @@ -123,7 +124,10 @@ HttpClient client = null; for (int i=0; i< ITERATION_COUNT; i++) { if (!sameClient || client == null) - client = HttpClient.newBuilder().sslContext(sslContext).build(); + client = HttpClient.newBuilder() + .proxy(NO_PROXY) + .sslContext(sslContext) + .build(); HttpRequest request = HttpRequest.newBuilder(uri).build(); HttpResponse resp = client.send(request, BodyHandlers.ofString()); @@ -147,7 +151,10 @@ HttpClient client = null; for (int i=0; i< ITERATION_COUNT; i++) { if (!sameClient || client == null) - client = HttpClient.newBuilder().sslContext(sslContext).build(); + client = HttpClient.newBuilder() + .proxy(NO_PROXY) + .sslContext(sslContext) + .build(); HttpRequest request = HttpRequest.newBuilder(uri).build(); diff -r c6fe988dca4c -r 9236d0fb75b9 test/jdk/java/net/httpclient/StreamingBody.java --- a/test/jdk/java/net/httpclient/StreamingBody.java Fri Apr 13 14:54:02 2018 +0100 +++ b/test/jdk/java/net/httpclient/StreamingBody.java Fri Apr 13 14:59:22 2018 +0100 @@ -60,6 +60,7 @@ import org.testng.annotations.Test; import static java.lang.System.out; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.net.http.HttpClient.Builder.NO_PROXY; import static org.testng.Assert.assertEquals; public class StreamingBody implements HttpServerAdapters { @@ -97,6 +98,7 @@ out.println("iteration: " + i); HttpResponse response = HttpClient.newBuilder() .sslContext(sslContext) + .proxy(NO_PROXY) .build() .sendAsync(request, BodyHandlers.ofInputStream()) .join();