Skip to content

Commit fe70487

Browse files
committed
8294958: java/net/httpclient/ConnectTimeout tests are slow
Reviewed-by: dfuchs, aefimov
1 parent 97f1321 commit fe70487

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

test/jdk/java/net/httpclient/AbstractConnectTimeout.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,19 +54,13 @@ public abstract class AbstractConnectTimeout {
5454

5555
static List<List<Duration>> TIMEOUTS = List.of(
5656
// connectTimeout HttpRequest timeout
57-
Arrays.asList( NO_DURATION, ofSeconds(1) ),
5857
Arrays.asList( NO_DURATION, ofMillis(100) ),
59-
Arrays.asList( NO_DURATION, ofNanos(99) ),
6058
Arrays.asList( NO_DURATION, ofNanos(1) ),
6159

62-
Arrays.asList( ofSeconds(1), NO_DURATION ),
6360
Arrays.asList( ofMillis(100), NO_DURATION ),
64-
Arrays.asList( ofNanos(99), NO_DURATION ),
6561
Arrays.asList( ofNanos(1), NO_DURATION ),
6662

67-
Arrays.asList( ofSeconds(1), ofMinutes(1) ),
6863
Arrays.asList( ofMillis(100), ofMinutes(1) ),
69-
Arrays.asList( ofNanos(99), ofMinutes(1) ),
7064
Arrays.asList( ofNanos(1), ofMinutes(1) )
7165
);
7266

test/jdk/java/net/httpclient/AbstractConnectTimeoutHandshake.java

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -68,17 +68,11 @@ public abstract class AbstractConnectTimeoutHandshake {
6868

6969
static List<List<Duration>> TIMEOUTS = List.of(
7070
// connectTimeout HttpRequest timeout
71-
Arrays.asList( NO_DURATION, ofSeconds(1) ),
72-
Arrays.asList( NO_DURATION, ofSeconds(2) ),
73-
Arrays.asList( NO_DURATION, ofMillis(500) ),
71+
Arrays.asList( NO_DURATION, ofMillis(100) ),
7472

75-
Arrays.asList( ofSeconds(1), NO_DURATION ),
76-
Arrays.asList( ofSeconds(2), NO_DURATION ),
77-
Arrays.asList( ofMillis(500), NO_DURATION ),
73+
Arrays.asList( ofMillis(100), NO_DURATION ),
7874

79-
Arrays.asList( ofSeconds(1), ofMinutes(1) ),
80-
Arrays.asList( ofSeconds(2), ofMinutes(1) ),
81-
Arrays.asList( ofMillis(500), ofMinutes(1) )
75+
Arrays.asList( ofMillis(100), ofMinutes(1) )
8276
);
8377

8478
static final List<String> METHODS = List.of("GET" , "POST");

0 commit comments

Comments
 (0)