8203297: java/net/URL/OpenStream.java fails intermittently
Reviewed-by: alanb, dfuchs
--- a/test/jdk/java/net/URL/OpenStream.java Thu May 24 15:46:04 2018 +0200
+++ b/test/jdk/java/net/URL/OpenStream.java Thu May 24 15:23:28 2018 +0100
@@ -55,7 +55,7 @@
static void checkThrows(String url) throws IOException {
URL u = new URL(url);
try {
- InputStream in = u.openStream();
+ InputStream in = u.openConnection(Proxy.NO_PROXY).getInputStream();
} catch (UnknownHostException x) {
System.out.println("UnknownHostException is thrown as expected.");
return;