Skip to content

Commit e43f986

Browse files
committed
chore: some explanation in ContextValueTests
1 parent b1c1310 commit e43f986

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kotlin-utils/src/commonTest/kotlin/org/modelix/kotlin/utils/ContextValueTests.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import kotlin.time.Duration.Companion.milliseconds
2727
class ContextValueTests {
2828

2929
@Test
30-
fun multipleCoroutines() = runTest {
30+
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+
3134
val contextValue = ContextValue<String>("a")
3235
assertEquals("a", contextValue.getValueOrNull())
3336
coroutineScope {

0 commit comments

Comments
 (0)