From d32fd31cebaf656211bbafca66b32c9d20993e14 Mon Sep 17 00:00:00 2001 From: Ilya Gulya Date: Wed, 10 Jan 2024 14:23:23 +0600 Subject: [PATCH] Make MainSchedulerTest to cancel task after successful periodic task test. --- .../kotlin/com/badoo/reaktive/scheduler/MainSchedulerTest.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reaktive/src/jsCommonTest/kotlin/com/badoo/reaktive/scheduler/MainSchedulerTest.kt b/reaktive/src/jsCommonTest/kotlin/com/badoo/reaktive/scheduler/MainSchedulerTest.kt index 9e924bf51..409005c4e 100644 --- a/reaktive/src/jsCommonTest/kotlin/com/badoo/reaktive/scheduler/MainSchedulerTest.kt +++ b/reaktive/src/jsCommonTest/kotlin/com/badoo/reaktive/scheduler/MainSchedulerTest.kt @@ -69,6 +69,9 @@ class MainSchedulerTest { return checkTicks.toList().testAwait { results -> assertEquals(expectedResults, results) + // Required to pass test on NodeJS environment since runtime waits + // for all tasks to cancel or finish their work. + executor.cancel() } } }