Skip to content

Commit

Permalink
Fix platform networking test
Browse files Browse the repository at this point in the history
  • Loading branch information
rorbech committed Jul 17, 2024
1 parent 56a2b03 commit b1534c2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import io.realm.kotlin.test.mongodb.createUserAndLogIn
import io.realm.kotlin.test.mongodb.use
import io.realm.kotlin.test.mongodb.util.DefaultFlexibleSyncAppInitializer
import io.realm.kotlin.test.util.use
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.withTimeout
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue
Expand Down Expand Up @@ -49,8 +51,9 @@ class PlatformNetworkingTests {
)
}
uploadRealm.syncSession.uploadAllLocalChanges(TIMEOUT)
realm.syncSession.downloadAllServerChanges(TIMEOUT)
assertEquals(1, realm.query<SyncObjectWithAllTypes>().find().size)
withTimeout(TIMEOUT) {
realm.query<SyncObjectWithAllTypes>().asFlow().first { it.list.size == 1 }
}
}
}
assertTrue(
Expand Down

0 comments on commit b1534c2

Please sign in to comment.