8129507: sun/net/www/protocol/http/B6369510.java fails intermittently
authormsheppar
Thu, 25 Jun 2015 14:23:03 +0100
changeset 31266 89dc3f0c1983
parent 31265 2eabccc392ed
child 31267 8fc8b89fe647
8129507: sun/net/www/protocol/http/B6369510.java fails intermittently Summary: changed openConnection() to openConnection(Proxy.NO_PROXY) Reviewed-by: chegar
jdk/test/sun/net/www/protocol/http/B6369510.java
--- a/jdk/test/sun/net/www/protocol/http/B6369510.java	Thu Jun 25 20:20:41 2015 +0800
+++ b/jdk/test/sun/net/www/protocol/http/B6369510.java	Thu Jun 25 14:23:03 2015 +0100
@@ -63,7 +63,7 @@
 
             // GET Request
             URL url = new URL("http://" + InetAddress.getLocalHost().getHostName() + ":" + address.getPort() + "/test/");
-            HttpURLConnection uc = (HttpURLConnection)url.openConnection();
+            HttpURLConnection uc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY);
             int resp = uc.getResponseCode();
             if (resp != 200)
                 throw new RuntimeException("Failed: Response code from GET is not 200 RSP == " + resp);
@@ -71,7 +71,7 @@
             System.out.println("Response code from GET = 200 OK");
 
             //POST Request
-            uc = (HttpURLConnection)url.openConnection();
+            uc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY);
             uc.setDoOutput(true);
             uc.setRequestMethod("POST");
             OutputStream os = uc.getOutputStream();