Skip to content

Commit e47cd2d

Browse files
committed
Disable non-blocking operation from model checking, inline classes are not supported by Lincheck
1 parent de18150 commit e47cd2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kotlinx-coroutines-core/jvm/test/lincheck/ChannelsLincheckTest.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ abstract class ChannelLincheckTestBase(
6262
e.testResult
6363
}
6464

65-
@Operation
65+
// @Operation TODO Lincheck doesn't work with inline classes
6666
fun trySend(@Param(name = "value") value: Int): Any = c.trySend(value)
6767
.onSuccess { return true }
6868
.onFailure {
@@ -85,11 +85,11 @@ abstract class ChannelLincheckTestBase(
8585
e.testResult
8686
}
8787

88-
@Operation
88+
// @Operation TODO Lincheck doesn't work with inline classes
8989
fun tryReceive(): Any? =
9090
c.tryReceive()
91-
.onSuccess { it }
92-
.onFailure { if (it is NumberedCancellationException) it.testResult else throw it!! }
91+
.onSuccess { return it }
92+
.onFailure { return if (it is NumberedCancellationException) it.testResult else throw it!! }
9393

9494
// TODO: this operation should be (and can be!) linearizable, but is not
9595
// @Operation

0 commit comments

Comments
 (0)