@@ -55,28 +55,34 @@ abstract class TransportTest : SuspendTest {
55
55
SERVER .startServer(serverTransport, ACCEPTOR )
56
56
57
57
override suspend fun after () {
58
+ // TODO: we do need delays in FAF and MP tests because in reality, here, we don't wait for the connection to be completed
59
+ // and so we start to close connection from both ends simultaneously
58
60
client.coroutineContext.job.cancelAndJoin()
59
61
testJob.cancelAndJoin()
60
62
}
61
63
62
64
@Test
63
65
fun fireAndForget10 () = test {
64
66
(1 .. 10 ).map { async { client.fireAndForget(payload(it)) } }.awaitAll()
67
+ delay(100 )
65
68
}
66
69
67
70
@Test
68
71
open fun largePayloadFireAndForget10 () = test {
69
72
(1 .. 10 ).map { async { client.fireAndForget(requesterLargePayload) } }.awaitAll()
73
+ delay(100 )
70
74
}
71
75
72
76
@Test
73
77
fun metadataPush10 () = test {
74
78
(1 .. 10 ).map { async { client.metadataPush(packet(requesterData)) } }.awaitAll()
79
+ delay(100 )
75
80
}
76
81
77
82
@Test
78
83
open fun largePayloadMetadataPush10 () = test {
79
84
(1 .. 10 ).map { async { client.metadataPush(packet(requesterLargeData)) } }.awaitAll()
85
+ delay(100 )
80
86
}
81
87
82
88
@Test
@@ -133,7 +139,6 @@ abstract class TransportTest : SuspendTest {
133
139
}
134
140
135
141
@Test
136
- @Ignore // flaky, ignore for now
137
142
fun requestChannel200000 () = test {
138
143
val request = flow {
139
144
repeat(200_000 ) { emit(payload(it)) }
@@ -162,7 +167,6 @@ abstract class TransportTest : SuspendTest {
162
167
}
163
168
164
169
@Test
165
- @Ignore // flaky, ignore for now
166
170
fun requestChannel256x512 () = test {
167
171
val request = flow {
168
172
repeat(512 ) {
@@ -187,17 +191,6 @@ abstract class TransportTest : SuspendTest {
187
191
}.awaitAll()
188
192
}
189
193
190
- @Test
191
- @Ignore // flaky, ignore for now
192
- fun requestStreamX256 () = test {
193
- (0 .. 256 ).map {
194
- async {
195
- val count = client.requestStream(payload(0 )).onEach { it.close() }.count()
196
- assertEquals(8192 , count)
197
- }
198
- }.awaitAll()
199
- }
200
-
201
194
@Test
202
195
fun requestChannel500NoLeak () = test {
203
196
val request = flow {
@@ -237,15 +230,17 @@ abstract class TransportTest : SuspendTest {
237
230
}
238
231
239
232
@Test
240
- @Ignore // windows
241
- fun requestResponse10000 () = test {
242
- (1 .. 10000 ).map { async { client.requestResponse(payload(3 )).let (Companion ::checkPayload) } }.awaitAll()
233
+ fun requestResponse10000Sequential () = test {
234
+ repeat(10000 ) {
235
+ client.requestResponse(payload(3 )).let (Companion ::checkPayload)
236
+ }
243
237
}
244
238
245
239
@Test
246
- @Ignore // QUIC
247
- fun requestResponse100000 () = test {
248
- repeat(100000 ) { client.requestResponse(payload(3 )).let (Companion ::checkPayload) }
240
+ fun requestResponse10000Parallel () = test {
241
+ repeat(10000 ) {
242
+ launch { client.requestResponse(payload(3 )).let (Companion ::checkPayload) }
243
+ }
249
244
}
250
245
251
246
@Test
@@ -258,7 +253,7 @@ abstract class TransportTest : SuspendTest {
258
253
@Test
259
254
fun requestStream8K () = test {
260
255
val count = client.requestStream(payload(3 )).onEach { checkPayload(it) }.count()
261
- assertEquals(8192 , count) // TODO
256
+ assertEquals(8192 , count)
262
257
}
263
258
264
259
@Test
0 commit comments