15
15
*/
16
16
package org .asynchttpclient ;
17
17
18
- import io . github . artsok . RepeatedIfExceptionsTest ;
18
+ import org . junit . jupiter . api . Test ;
19
19
20
20
import java .time .Duration ;
21
21
import java .util .List ;
@@ -34,7 +34,7 @@ public class ClientStatsTest extends AbstractBasicTest {
34
34
35
35
private static final String hostname = "localhost" ;
36
36
37
- @ RepeatedIfExceptionsTest ( repeats = 5 )
37
+ @ Test
38
38
public void testClientStatus () throws Throwable {
39
39
try (final AsyncHttpClient client = asyncHttpClient (config ().setKeepAlive (true ).setPooledConnectionIdleTimeout (Duration .ofSeconds (5 )))) {
40
40
final String url = getTargetUrl ();
@@ -51,7 +51,7 @@ public void testClientStatus() throws Throwable {
51
51
.limit (5 )
52
52
.collect (Collectors .toList ());
53
53
54
- Thread .sleep (2000 + 1000 );
54
+ Thread .sleep (2000 );
55
55
56
56
final ClientStats activeStats = client .getClientStats ();
57
57
@@ -63,7 +63,7 @@ public void testClientStatus() throws Throwable {
63
63
64
64
futures .forEach (future -> future .toCompletableFuture ().join ());
65
65
66
- Thread .sleep (1000 + 1000 );
66
+ Thread .sleep (1000 );
67
67
68
68
final ClientStats idleStats = client .getClientStats ();
69
69
@@ -79,7 +79,7 @@ public void testClientStatus() throws Throwable {
79
79
.limit (3 )
80
80
.collect (Collectors .toList ());
81
81
82
- Thread .sleep (2000 + 1000 );
82
+ Thread .sleep (2000 );
83
83
84
84
final ClientStats activeCachedStats = client .getClientStats ();
85
85
@@ -91,7 +91,7 @@ public void testClientStatus() throws Throwable {
91
91
92
92
repeatedFutures .forEach (future -> future .toCompletableFuture ().join ());
93
93
94
- Thread .sleep (1000 + 1000 );
94
+ Thread .sleep (1000 );
95
95
96
96
final ClientStats idleCachedStats = client .getClientStats ();
97
97
@@ -101,7 +101,7 @@ public void testClientStatus() throws Throwable {
101
101
assertEquals (3 , idleCachedStats .getTotalConnectionCount ());
102
102
assertEquals (3 , idleCachedStats .getStatsPerHost ().get (hostname ).getHostConnectionCount ());
103
103
104
- Thread .sleep (5000 + 1000 );
104
+ Thread .sleep (5000 );
105
105
106
106
final ClientStats timeoutStats = client .getClientStats ();
107
107
@@ -113,7 +113,7 @@ public void testClientStatus() throws Throwable {
113
113
}
114
114
}
115
115
116
- @ RepeatedIfExceptionsTest ( repeats = 5 )
116
+ @ Test
117
117
public void testClientStatusNoKeepalive () throws Throwable {
118
118
try (final AsyncHttpClient client = asyncHttpClient (config ().setKeepAlive (false ).setPooledConnectionIdleTimeout (Duration .ofSeconds (1 )))) {
119
119
final String url = getTargetUrl ();
@@ -130,7 +130,7 @@ public void testClientStatusNoKeepalive() throws Throwable {
130
130
.limit (5 )
131
131
.collect (Collectors .toList ());
132
132
133
- Thread .sleep (2000 + 1000 );
133
+ Thread .sleep (2000 );
134
134
135
135
final ClientStats activeStats = client .getClientStats ();
136
136
@@ -142,7 +142,7 @@ public void testClientStatusNoKeepalive() throws Throwable {
142
142
143
143
futures .forEach (future -> future .toCompletableFuture ().join ());
144
144
145
- Thread .sleep (1000 + 1000 );
145
+ Thread .sleep (1000 );
146
146
147
147
final ClientStats idleStats = client .getClientStats ();
148
148
@@ -158,7 +158,7 @@ public void testClientStatusNoKeepalive() throws Throwable {
158
158
.limit (3 )
159
159
.collect (Collectors .toList ());
160
160
161
- Thread .sleep (2000 + 1000 );
161
+ Thread .sleep (2000 );
162
162
163
163
final ClientStats activeCachedStats = client .getClientStats ();
164
164
@@ -170,7 +170,7 @@ public void testClientStatusNoKeepalive() throws Throwable {
170
170
171
171
repeatedFutures .forEach (future -> future .toCompletableFuture ().join ());
172
172
173
- Thread .sleep (1000 + 1000 );
173
+ Thread .sleep (1000 );
174
174
175
175
final ClientStats idleCachedStats = client .getClientStats ();
176
176
0 commit comments