diff --git a/packages/external/core b/packages/external/core index c280bdb175..058ecce712 160000 --- a/packages/external/core +++ b/packages/external/core @@ -1 +1 @@ -Subproject commit c280bdb17522323d5c30dc32a2b9efc9dc80ca3b +Subproject commit 058ecce712b4be8b2a2384ed893bf83d56a49fc0 diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FLXProgressListenerTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FLXProgressListenerTests.kt index 9c67b39196..53728762cf 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FLXProgressListenerTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FLXProgressListenerTests.kt @@ -239,7 +239,7 @@ class FLXProgressListenerTests { try { val flow = realm.syncSession.progressAsFlow(Direction.UPLOAD, ProgressMode.INDEFINITELY) val job = async { - withTimeout(10.seconds) { + withTimeout(30.seconds) { flow.collect { channel.trySend(true) } diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/SyncClientResetIntegrationTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/SyncClientResetIntegrationTests.kt index 66a26acc6b..660fac5c7d 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/SyncClientResetIntegrationTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/SyncClientResetIntegrationTests.kt @@ -710,10 +710,8 @@ class SyncClientResetIntegrationTests { exception: ClientResetRequiredException ) { // Notify that this callback has been invoked - assertEquals( - "[Sync][AutoClientResetFailed(1028)] A fatal error occurred during client reset: 'User-provided callback failed'.", - exception.message - ) + assertTrue(exception.message!!.contains("User-provided callback failed")) + assertIs(exception.cause) assertEquals( "User exception", @@ -788,10 +786,8 @@ class SyncClientResetIntegrationTests { exception: ClientResetRequiredException ) { // Notify that this callback has been invoked - assertEquals( - "[Sync][AutoClientResetFailed(1028)] A fatal error occurred during client reset: 'User-provided callback failed'.", - exception.message - ) + assertTrue(exception.message!!.contains("User-provided callback failed")) + channel.trySendOrFail(ClientResetEvents.ON_MANUAL_RESET_FALLBACK) } }).build() @@ -1123,10 +1119,8 @@ class SyncClientResetIntegrationTests { exception: ClientResetRequiredException ) { // Notify that this callback has been invoked - assertEquals( - "[Sync][AutoClientResetFailed(1028)] A fatal error occurred during client reset: 'User-provided callback failed'.", - exception.message - ) + assertTrue(exception.message!!.contains("User-provided callback failed")) + channel.trySendOrFail(ClientResetEvents.ON_MANUAL_RESET_FALLBACK) } }).build() @@ -1193,11 +1187,8 @@ class SyncClientResetIntegrationTests { // Validate that files have been moved after explicit reset assertFalse(fileExists(originalFilePath)) assertTrue(fileExists(recoveryFilePath)) - - assertEquals( - "[Sync][AutoClientResetFailed(1028)] A fatal error occurred during client reset: 'User-provided callback failed'.", - exception.message - ) + println(exception.message) + assertTrue(exception.message!!.contains("User-provided callback failed")) channel.trySendOrFail(ClientResetEvents.ON_MANUAL_RESET_FALLBACK) } @@ -1400,10 +1391,7 @@ class SyncClientResetIntegrationTests { assertFalse(fileExists(originalFilePath)) assertTrue(fileExists(recoveryFilePath)) - assertEquals( - "[Sync][AutoClientResetFailed(1028)] A fatal error occurred during client reset: 'User-provided callback failed'.", - exception.message - ) + assertTrue(exception.message!!.contains("User-provided callback failed")) channel.trySendOrFail(ClientResetEvents.ON_MANUAL_RESET_FALLBACK) }