@@ -55,28 +55,34 @@ abstract class TransportTest : SuspendTest {
5555 SERVER .startServer(serverTransport, ACCEPTOR )
5656
5757 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
5860 client.coroutineContext.job.cancelAndJoin()
5961 testJob.cancelAndJoin()
6062 }
6163
6264 @Test
6365 fun fireAndForget10 () = test {
6466 (1 .. 10 ).map { async { client.fireAndForget(payload(it)) } }.awaitAll()
67+ delay(100 )
6568 }
6669
6770 @Test
6871 open fun largePayloadFireAndForget10 () = test {
6972 (1 .. 10 ).map { async { client.fireAndForget(requesterLargePayload) } }.awaitAll()
73+ delay(100 )
7074 }
7175
7276 @Test
7377 fun metadataPush10 () = test {
7478 (1 .. 10 ).map { async { client.metadataPush(packet(requesterData)) } }.awaitAll()
79+ delay(100 )
7580 }
7681
7782 @Test
7883 open fun largePayloadMetadataPush10 () = test {
7984 (1 .. 10 ).map { async { client.metadataPush(packet(requesterLargeData)) } }.awaitAll()
85+ delay(100 )
8086 }
8187
8288 @Test
@@ -133,7 +139,6 @@ abstract class TransportTest : SuspendTest {
133139 }
134140
135141 @Test
136- @Ignore // flaky, ignore for now
137142 fun requestChannel200000 () = test {
138143 val request = flow {
139144 repeat(200_000 ) { emit(payload(it)) }
@@ -162,7 +167,6 @@ abstract class TransportTest : SuspendTest {
162167 }
163168
164169 @Test
165- @Ignore // flaky, ignore for now
166170 fun requestChannel256x512 () = test {
167171 val request = flow {
168172 repeat(512 ) {
@@ -187,17 +191,6 @@ abstract class TransportTest : SuspendTest {
187191 }.awaitAll()
188192 }
189193
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-
201194 @Test
202195 fun requestChannel500NoLeak () = test {
203196 val request = flow {
@@ -237,15 +230,17 @@ abstract class TransportTest : SuspendTest {
237230 }
238231
239232 @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+ }
243237 }
244238
245239 @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+ }
249244 }
250245
251246 @Test
@@ -258,7 +253,7 @@ abstract class TransportTest : SuspendTest {
258253 @Test
259254 fun requestStream8K () = test {
260255 val count = client.requestStream(payload(3 )).onEach { checkPayload(it) }.count()
261- assertEquals(8192 , count) // TODO
256+ assertEquals(8192 , count)
262257 }
263258
264259 @Test
0 commit comments