Skip to content

Commit

Permalink
Fix test using TestChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Dec 7, 2023
1 parent df77357 commit b984e8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -305,7 +306,7 @@ class RealmObjectNotificationsTests : RealmEntityNotificationTests {

@Test
override fun keyPath_topLevelProperty() = runBlocking<Unit> {
val c = Channel<ObjectChange<Sample>>(1)
val c = TestChannel<ObjectChange<Sample>>()
val obj: Sample = realm.write { copyToRealm(Sample()) }
val observer = async {
obj.asFlow(listOf("stringField")).collect {
Expand Down

0 comments on commit b984e8a

Please sign in to comment.