|
33 | 33 | import java.net.http.HttpResponse; |
34 | 34 | import java.net.http.HttpResponse.BodyHandlers; |
35 | 35 | import java.nio.charset.StandardCharsets; |
36 | | -import java.time.Duration; |
37 | 36 | import java.util.HashMap; |
38 | 37 | import java.util.List; |
39 | 38 | import java.util.Map; |
|
47 | 46 | import java.util.concurrent.atomic.AtomicLong; |
48 | 47 | import javax.net.ssl.SSLContext; |
49 | 48 |
|
| 49 | +import jdk.test.lib.Utils; |
50 | 50 | import jdk.test.lib.net.SimpleSSLContext; |
51 | 51 | import jdk.httpclient.test.lib.common.HttpServerAdapters; |
52 | 52 | import jdk.httpclient.test.lib.http2.Http2TestServer; |
|
74 | 74 | * @library /test/lib /test/jdk/java/net/httpclient/lib |
75 | 75 | * @build jdk.test.lib.net.SimpleSSLContext |
76 | 76 | * jdk.httpclient.test.lib.common.HttpServerAdapters |
| 77 | + * jdk.test.lib.Utils |
77 | 78 | * @compile ../ReferenceTracker.java |
78 | | - * @run testng/othervm/timeout=60 -Djdk.internal.httpclient.debug=true |
| 79 | + * @run testng/othervm -Djdk.internal.httpclient.debug=true |
79 | 80 | * -Djdk.httpclient.HttpClient.log=requests,responses,errors |
80 | 81 | * GetHTTP3Test |
81 | 82 | * @summary Basic HTTP/3 GET test |
@@ -216,7 +217,6 @@ private HttpClient makeNewClient() { |
216 | 217 | .proxy(HttpClient.Builder.NO_PROXY) |
217 | 218 | .executor(executor) |
218 | 219 | .sslContext(sslContext) |
219 | | - .connectTimeout(Duration.ofSeconds(10)) |
220 | 220 | .build(); |
221 | 221 | return TRACKER.track(client); |
222 | 222 | } |
@@ -348,7 +348,7 @@ public void testAsync(String uri, Version firstRequestVersion, boolean sameClien |
348 | 348 | var tracker = TRACKER.getTracker(client); |
349 | 349 | client = null; |
350 | 350 | System.gc(); |
351 | | - AssertionError error = TRACKER.check(tracker, 1000); |
| 351 | + AssertionError error = TRACKER.check(tracker, Utils.adjustTimeout(1000)); |
352 | 352 | if (error != null) throw error; |
353 | 353 | } |
354 | 354 | System.out.println("test: DONE"); |
@@ -394,7 +394,7 @@ public void testSync(String h3URI) throws Exception { |
394 | 394 | var tracker = TRACKER.getTracker(client); |
395 | 395 | client = null; |
396 | 396 | System.gc(); |
397 | | - AssertionError error = TRACKER.check(tracker, 1000); |
| 397 | + AssertionError error = TRACKER.check(tracker, Utils.adjustTimeout(1000)); |
398 | 398 | if (error != null) throw error; |
399 | 399 | } |
400 | 400 |
|
@@ -423,7 +423,7 @@ public void teardown() throws Exception { |
423 | 423 | sharedClient == null ? null : sharedClient.toString(); |
424 | 424 | sharedClient = null; |
425 | 425 | Thread.sleep(100); |
426 | | - AssertionError fail = TRACKER.check(500); |
| 426 | + AssertionError fail = TRACKER.check(Utils.adjustTimeout(1000)); |
427 | 427 | try { |
428 | 428 | h3TestServer.stop(); |
429 | 429 | } finally { |
|
0 commit comments