We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1c1310 commit e43f986Copy full SHA for e43f986
kotlin-utils/src/commonTest/kotlin/org/modelix/kotlin/utils/ContextValueTests.kt
@@ -27,7 +27,10 @@ import kotlin.time.Duration.Companion.milliseconds
27
class ContextValueTests {
28
29
@Test
30
- fun multipleCoroutines() = runTest {
+ fun testIsolation() = runTest {
31
+ // run multiple suspendable and non-suspendable functions in parallel to ensure they always read their own value
32
+ // and not a value from a different coroutine/thread.
33
+
34
val contextValue = ContextValue<String>("a")
35
assertEquals("a", contextValue.getValueOrNull())
36
coroutineScope {
0 commit comments