aboutsummaryrefslogtreecommitdiffstats
path: root/kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt')
-rw-r--r--kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt b/kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt
index 7dd232f2..a8c2a29c 100644
--- a/kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt
+++ b/kotlinx-coroutines-core/common/test/channels/ConflatedBroadcastChannelTest.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
+ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package kotlinx.coroutines.channels
@@ -42,7 +42,7 @@ class ConflatedBroadcastChannelTest : TestBase() {
launch(start = CoroutineStart.UNDISPATCHED) {
expect(2)
val sub = broadcast.openSubscription()
- assertNull(sub.poll())
+ assertNull(sub.tryReceive().getOrNull())
expect(3)
assertEquals("one", sub.receive()) // suspends
expect(6)
@@ -68,7 +68,7 @@ class ConflatedBroadcastChannelTest : TestBase() {
expect(14)
assertEquals("three", sub.receive()) // suspends
expect(17)
- assertNull(sub.receiveOrNull()) // suspends until closed
+ assertNull(sub.receiveCatching().getOrNull()) // suspends until closed
expect(20)
sub.cancel()
expect(21)