diff --git a/arrow-libs/fx/arrow-fx-coroutines/src/jvmTest/kotlin/arrow/fx/coroutines/ParZip7JvmTest.kt b/arrow-libs/fx/arrow-fx-coroutines/src/jvmTest/kotlin/arrow/fx/coroutines/ParZip7JvmTest.kt index 502519e47e4..1af73d38194 100644 --- a/arrow-libs/fx/arrow-fx-coroutines/src/jvmTest/kotlin/arrow/fx/coroutines/ParZip7JvmTest.kt +++ b/arrow-libs/fx/arrow-fx-coroutines/src/jvmTest/kotlin/arrow/fx/coroutines/ParZip7JvmTest.kt @@ -3,7 +3,6 @@ package arrow.fx.coroutines import arrow.core.Either import arrow.core.Tuple7 import io.kotest.assertions.assertSoftly -import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.should import io.kotest.matchers.string.shouldStartWith import io.kotest.mpp.NamedThreadFactory @@ -14,13 +13,15 @@ import io.kotest.property.checkAll import java.util.concurrent.Executors import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.awaitCancellation +import kotlinx.coroutines.test.runTest import kotlinx.coroutines.withContext +import kotlin.test.Test -class ParZip7JvmTest : StringSpec({ +class ParZip7JvmTest { val threadName: suspend CoroutineScope.() -> String = { Thread.currentThread().name } - "parZip 7 returns to original context" { + @Test fun parZip7ReturnsToOriginalContext() = runTest { val zipCtxName = "parZip7" resourceScope { val zipCtx = executor { Executors.newFixedThreadPool(7, NamedThreadFactory(zipCtxName)) } @@ -46,7 +47,7 @@ class ParZip7JvmTest : StringSpec({ } } - "parZip 7 returns to original context on failure" { + @Test fun parZip7ReturnsToOriginalContextOnFailure() = runTest { val zipCtxName = "parZip7" resourceScope { val zipCtx = executor { Executors.newFixedThreadPool(7, NamedThreadFactory(zipCtxName)) } @@ -141,7 +142,7 @@ class ParZip7JvmTest : StringSpec({ } } - "parZip 7 finishes on single thread" { + @Test fun parZip7FinishesOnSingleThread() = runTest { checkAll(Arb.string()) { val res = resourceScope { val ctx = singleThreadContext("single") @@ -164,4 +165,3 @@ class ParZip7JvmTest : StringSpec({ } } } -)