From b984e8a888eda04f26c59518e84146d850940cc3 Mon Sep 17 00:00:00 2001 From: Christian Melchior Date: Thu, 7 Dec 2023 17:13:42 +0100 Subject: [PATCH] Fix test using TestChannel --- .../test/common/notifications/RealmObjectNotificationsTests.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/test-base/src/commonTest/kotlin/io/realm/kotlin/test/common/notifications/RealmObjectNotificationsTests.kt b/packages/test-base/src/commonTest/kotlin/io/realm/kotlin/test/common/notifications/RealmObjectNotificationsTests.kt index e1d50a353e..60dec6fe22 100644 --- a/packages/test-base/src/commonTest/kotlin/io/realm/kotlin/test/common/notifications/RealmObjectNotificationsTests.kt +++ b/packages/test-base/src/commonTest/kotlin/io/realm/kotlin/test/common/notifications/RealmObjectNotificationsTests.kt @@ -30,6 +30,7 @@ import io.realm.kotlin.test.util.TestChannel import io.realm.kotlin.test.util.receiveOrFail import io.realm.kotlin.test.util.update import kotlinx.coroutines.async +import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.onCompletion import kotlinx.coroutines.flow.single @@ -305,7 +306,7 @@ class RealmObjectNotificationsTests : RealmEntityNotificationTests { @Test override fun keyPath_topLevelProperty() = runBlocking { - val c = Channel>(1) + val c = TestChannel>() val obj: Sample = realm.write { copyToRealm(Sample()) } val observer = async { obj.asFlow(listOf("stringField")).collect {