Skip to content

Commit

Permalink
allow initialRealm_partitionBasedSync to be rerun
Browse files Browse the repository at this point in the history
  • Loading branch information
clementetb committed Jul 10, 2024
1 parent 0a1db63 commit ba0cfd1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1650,14 +1650,17 @@ class SyncedRealmTests {
println("Partition based sync bundled realm is in ${config2.path}")
}

// This test cannot run multiple times on the same server instance as the primary
// key of the objects from asset-pbs.realm will not be unique on secondary runs.
@Test
fun initialRealm_partitionBasedSync() {
val (email, password) = randomEmail() to "password1234"
val user = runBlocking {
app.createUserAndLogIn(email, password)
}

runBlocking {
app.asTestApp.deleteDocuments(app.configuration.appId, "ParentPk", "{}")
}

val config1 = createPartitionSyncConfig(
user = user, partitionValue = partitionValue, name = "db1",
errorHandler = object : SyncSession.ErrorHandler {
Expand Down

0 comments on commit ba0cfd1

Please sign in to comment.