File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
gradle-conventions/src/main/kotlin/util/targets
krpc/krpc-test/src/commonMain/kotlin/kotlinx/rpc/krpc/test Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fun KmpConfig.configureJs() {
2222 nodejs {
2323 testTask {
2424 useMocha {
25- timeout = " 100s "
25+ timeout = " 300s "
2626 }
2727 }
2828 }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import kotlinx.serialization.encoding.Encoder
2828import kotlinx.serialization.modules.SerializersModule
2929import kotlin.coroutines.cancellation.CancellationException
3030import kotlin.test.*
31+ import kotlin.time.Duration.Companion.seconds
3132
3233internal object LocalDateSerializer : KSerializer<LocalDate> {
3334 override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor (" LocalDate" , PrimitiveKind .STRING )
@@ -285,7 +286,7 @@ abstract class KrpcTransportTestBase {
285286 }
286287
287288 @Test
288- fun `RPC should be able to receive 100_000 ints in reasonable time` () = runTest {
289+ fun `RPC should be able to receive 100_000 ints in reasonable time` () = runTest(timeout = JS_EXTENDED_TIMEOUT ) {
289290 val n = 100_000
290291 assertEquals(client.getNInts(n).last(), n)
291292 }
@@ -437,4 +438,6 @@ abstract class KrpcTransportTestBase {
437438 }
438439}
439440
441+ private val JS_EXTENDED_TIMEOUT = if (isJs) 300 .seconds else 60 .seconds
442+
440443internal expect val isJs: Boolean
You can’t perform that action at this time.
0 commit comments