changeset 31266:89dc3f0c1983

8129507: sun/net/www/protocol/http/B6369510.java fails intermittently Summary: changed openConnection() to openConnection(Proxy.NO_PROXY) Reviewed-by: chegar
author msheppar
date Thu, 25 Jun 2015 14:23:03 +0100
parents 2eabccc392ed
children 8fc8b89fe647
files jdk/test/sun/net/www/protocol/http/B6369510.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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();