Skip to content

Commit

Permalink
Attempt to fix race conditions in RealmNotificationsTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Nov 27, 2023
1 parent 7d2e88b commit 4d78d2b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class RealmNotificationsTests : FlowableTests {
@Test
override fun initialElement() {
runBlocking {
val c = Channel<RealmChange<Realm>>(1)
val c = Channel<RealmChange<Realm>>(0)
val startingVersion = realm.version()
val observer = async {
realm.asFlow().collect {
Expand All @@ -93,7 +93,7 @@ class RealmNotificationsTests : FlowableTests {
@Test
override fun asFlow() {
runBlocking {
val c = Channel<RealmChange<Realm>>(1)
val c = Channel<RealmChange<Realm>>(0)
val startingVersion = realm.version()
val observer = async {
realm.asFlow().collect {
Expand Down Expand Up @@ -122,8 +122,8 @@ class RealmNotificationsTests : FlowableTests {

@Test
override fun cancelAsFlow() = runBlocking<Unit> {
val c1 = Channel<RealmChange<Realm>>(1)
val c2 = Channel<RealmChange<Realm>>(1)
val c1 = Channel<RealmChange<Realm>>(0)
val c2 = Channel<RealmChange<Realm>>(0)
val startingVersion = realm.version()

val observer1 = async {
Expand Down

0 comments on commit 4d78d2b

Please sign in to comment.