equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
26 import java.io.IOException; |
26 import java.io.IOException; |
27 import java.io.OutputStream; |
27 import java.io.OutputStream; |
28 import java.net.*; |
28 import java.net.*; |
29 import java.util.List; |
29 import java.util.List; |
30 import java.util.Map; |
30 import java.util.Map; |
31 import java.util.concurrent.Executors; |
31 import static java.net.Proxy.NO_PROXY; |
32 |
32 |
33 /* |
33 /* |
34 * @test |
34 * @test |
35 * @bug 7169142 |
35 * @bug 7169142 |
36 * @key intermittent |
36 * @key intermittent |
50 Server s = null; |
50 Server s = null; |
51 try { |
51 try { |
52 s = new Server(); |
52 s = new Server(); |
53 s.startServer(); |
53 s.startServer(); |
54 URL url = new URL("http","localhost", s.getPort(), "/"); |
54 URL url = new URL("http","localhost", s.getPort(), "/"); |
55 HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection(); |
55 HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection(NO_PROXY); |
56 urlConnection.setRequestMethod("GET"); |
56 urlConnection.setRequestMethod("GET"); |
57 urlConnection.setDoOutput(true); |
57 urlConnection.setDoOutput(true); |
58 urlConnection.connect(); |
58 urlConnection.connect(); |
59 urlConnection.getInputStream(); |
59 urlConnection.getInputStream(); |
60 |
60 |