diff --git a/CHANGELOG.md b/CHANGELOG.md index c89297b997..457b719d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi * Minimum R8: 8.0.34. ### Internal -* None. +* Updated to Realm Core 14.5.2 commit bec09f89ebc9dc52596375cbf20451429ed9fe89. ## 1.15.0 (2024-04-17) diff --git a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt index 663ec08b01..b7f6dcee5b 100644 --- a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt +++ b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt @@ -118,10 +118,9 @@ expect enum class ErrorCode : CodeDescription { RLM_ERR_BAD_SERVER_URL, RLM_ERR_CUSTOM_ERROR, RLM_ERR_CLIENT_USER_NOT_FOUND, - RLM_ERR_CLIENT_USER_NOT_LOGGED_IN, - RLM_ERR_CLIENT_APP_DEALLOCATED, RLM_ERR_CLIENT_REDIRECT_ERROR, RLM_ERR_CLIENT_TOO_MANY_REDIRECTS, + RLM_ERR_CLIENT_USER_ALREADY_NAMED, RLM_ERR_BAD_TOKEN, RLM_ERR_MALFORMED_JSON, RLM_ERR_MISSING_JSON_KEY, diff --git a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 1a42b6faac..a104654b3a 100644 --- a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -572,8 +572,8 @@ expect object RealmInterop { appId: String ) - fun realm_sync_client_config_set_base_file_path( - syncClientConfig: RealmSyncClientConfigurationPointer, + fun realm_app_config_set_base_file_path( + appConfig: RealmAppConfigurationPointer, basePath: String ) @@ -583,13 +583,13 @@ expect object RealmInterop { fun realm_set_log_level(level: CoreLogLevel) - fun realm_sync_client_config_set_metadata_mode( - syncClientConfig: RealmSyncClientConfigurationPointer, + fun realm_app_config_set_metadata_mode( + appConfig: RealmAppConfigurationPointer, metadataMode: MetadataMode ) - fun realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig: RealmSyncClientConfigurationPointer, + fun realm_app_config_set_metadata_encryption_key( + appConfig: RealmAppConfigurationPointer, encryptionKey: ByteArray ) fun realm_sync_client_config_set_user_agent_binding_info( diff --git a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt index 6f29186e39..6e5a5d6f75 100644 --- a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt +++ b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt @@ -115,10 +115,9 @@ actual enum class ErrorCode(actual override val description: String?, actual ove RLM_ERR_BAD_SERVER_URL("BadServerUrl", realm_errno_e.RLM_ERR_BAD_SERVER_URL), RLM_ERR_CUSTOM_ERROR("CustomError", realm_errno_e.RLM_ERR_CUSTOM_ERROR), RLM_ERR_CLIENT_USER_NOT_FOUND("ClientUserNotFound", realm_errno_e.RLM_ERR_CLIENT_USER_NOT_FOUND), - RLM_ERR_CLIENT_USER_NOT_LOGGED_IN("ClientUserNotLoggedIn", realm_errno_e.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN), - RLM_ERR_CLIENT_APP_DEALLOCATED("ClientAppDeallocated", realm_errno_e.RLM_ERR_CLIENT_APP_DEALLOCATED), RLM_ERR_CLIENT_REDIRECT_ERROR("ClientRedirectError", realm_errno_e.RLM_ERR_CLIENT_REDIRECT_ERROR), RLM_ERR_CLIENT_TOO_MANY_REDIRECTS("ClientTooManyRedirects", realm_errno_e.RLM_ERR_CLIENT_TOO_MANY_REDIRECTS), + RLM_ERR_CLIENT_USER_ALREADY_NAMED("ClientUserAlreadyNamed", realm_errno_e.RLM_ERR_CLIENT_USER_ALREADY_NAMED), RLM_ERR_BAD_TOKEN("BadToken", realm_errno_e.RLM_ERR_BAD_TOKEN), RLM_ERR_MALFORMED_JSON("MalformedJson", realm_errno_e.RLM_ERR_MALFORMED_JSON), RLM_ERR_MISSING_JSON_KEY("MissingJsonKey", realm_errno_e.RLM_ERR_MISSING_JSON_KEY), diff --git a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 7797adcf14..a5aafc5258 100644 --- a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -17,7 +17,6 @@ package io.realm.kotlin.internal.interop import io.realm.kotlin.internal.interop.Constants.ENCRYPTION_KEY_LENGTH -import io.realm.kotlin.internal.interop.RealmInterop.cptr import io.realm.kotlin.internal.interop.sync.ApiKeyWrapper import io.realm.kotlin.internal.interop.sync.AuthProvider import io.realm.kotlin.internal.interop.sync.CoreConnectionState @@ -1099,7 +1098,7 @@ actual object RealmInterop { syncClientConfig: RealmSyncClientConfigurationPointer, basePath: String ): RealmAppPointer { - return LongPointerWrapper(realmc.realm_app_create(appConfig.cptr(), syncClientConfig.cptr()), managed = true) + return LongPointerWrapper(realmc.realm_app_create(appConfig.cptr()), managed = true) } actual fun realm_app_log_in_with_credentials( @@ -1276,11 +1275,11 @@ actual object RealmInterop { ) } - actual fun realm_sync_client_config_set_base_file_path( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_base_file_path( + appConfig: RealmAppConfigurationPointer, basePath: String ) { - realmc.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath) + realmc.realm_app_config_set_base_file_path(appConfig.cptr(), basePath) } actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) { @@ -1295,22 +1294,22 @@ actual object RealmInterop { realmc.realm_set_log_level(level.priority) } - actual fun realm_sync_client_config_set_metadata_mode( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_mode( + appConfig: RealmAppConfigurationPointer, metadataMode: MetadataMode ) { - realmc.realm_sync_client_config_set_metadata_mode( - syncClientConfig.cptr(), + realmc.realm_app_config_set_metadata_mode( + appConfig.cptr(), metadataMode.nativeValue ) } - actual fun realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_encryption_key( + appConfig: RealmAppConfigurationPointer, encryptionKey: ByteArray ) { - realmc.realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig.cptr(), + realmc.realm_app_config_set_metadata_encryption_key( + appConfig.cptr(), encryptionKey ) } diff --git a/packages/cinterop/src/native/realm.def b/packages/cinterop/src/native/realm.def index 01f59930d9..925f075c04 100644 --- a/packages/cinterop/src/native/realm.def +++ b/packages/cinterop/src/native/realm.def @@ -1,5 +1,6 @@ headers = realm.h realm/error_codes.h headerFilter = realm.h realm/error_codes.h +compilerOpts = -DREALM_APP_SERVICES=1 // Relative paths in def file depends are resolved differently dependent on execution // location // https://youtrack.jetbrains.com/issue/KT-43439 diff --git a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt index 3c11d2f557..4d401a8ff3 100644 --- a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt +++ b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/ErrorCode.kt @@ -120,9 +120,9 @@ actual enum class ErrorCode( RLM_ERR_CUSTOM_ERROR("CustomError", realm_errno.RLM_ERR_CUSTOM_ERROR), RLM_ERR_CLIENT_USER_NOT_FOUND("ClientUserNotFound", realm_errno.RLM_ERR_CLIENT_USER_NOT_FOUND), RLM_ERR_CLIENT_USER_NOT_LOGGED_IN("ClientUserNotLoggedIn", realm_errno.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN), - RLM_ERR_CLIENT_APP_DEALLOCATED("ClientAppDeallocated", realm_errno.RLM_ERR_CLIENT_APP_DEALLOCATED), RLM_ERR_CLIENT_REDIRECT_ERROR("ClientRedirectError", realm_errno.RLM_ERR_CLIENT_REDIRECT_ERROR), RLM_ERR_CLIENT_TOO_MANY_REDIRECTS("ClientTooManyRedirects", realm_errno.RLM_ERR_CLIENT_TOO_MANY_REDIRECTS), + RLM_ERR_CLIENT_USER_ALREADY_NAMED("ClientUserAlreadyNamed", realm_errno.RLM_ERR_CLIENT_USER_ALREADY_NAMED), RLM_ERR_BAD_TOKEN("BadToken", realm_errno.RLM_ERR_BAD_TOKEN), RLM_ERR_MALFORMED_JSON("MalformedJson", realm_errno.RLM_ERR_MALFORMED_JSON), RLM_ERR_MISSING_JSON_KEY("MissingJsonKey", realm_errno.RLM_ERR_MISSING_JSON_KEY), diff --git a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 10b979dafa..dab6cefd79 100644 --- a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -97,7 +97,6 @@ import platform.posix.strerror import platform.posix.uint64_t import platform.posix.uint8_tVar import realm_wrapper.realm_app_error_t -import realm_wrapper.realm_app_user_apikey_t import realm_wrapper.realm_binary_t import realm_wrapper.realm_class_info_t import realm_wrapper.realm_class_key_tVar @@ -123,7 +122,6 @@ import realm_wrapper.realm_results_t import realm_wrapper.realm_scheduler_t import realm_wrapper.realm_set_t import realm_wrapper.realm_string_t -import realm_wrapper.realm_sync_client_metadata_mode import realm_wrapper.realm_sync_session_resync_mode import realm_wrapper.realm_sync_session_state_e import realm_wrapper.realm_sync_session_stop_policy_e @@ -134,7 +132,6 @@ import realm_wrapper.realm_sync_socket_timer_t import realm_wrapper.realm_sync_socket_websocket_t import realm_wrapper.realm_sync_socket_write_callback_t import realm_wrapper.realm_t -import realm_wrapper.realm_user_identity import realm_wrapper.realm_user_t import realm_wrapper.realm_value_t import realm_wrapper.realm_value_type @@ -2001,7 +1998,7 @@ actual object RealmInterop { syncClientConfig: RealmSyncClientConfigurationPointer, basePath: String ): RealmAppPointer { - return CPointerWrapper(realm_wrapper.realm_app_create(appConfig.cptr(), syncClientConfig.cptr()), managed = true) + return CPointerWrapper(realm_wrapper.realm_app_create(appConfig.cptr()), managed = true) } actual fun realm_app_get_current_user(app: RealmAppPointer): RealmUserPointer? { @@ -2063,12 +2060,12 @@ actual object RealmInterop { name: String, callback: AppCallback ) { - checkedBooleanResult( + checkedBooleanResult( realm_wrapper.realm_app_user_apikey_provider_client_create_apikey( app.cptr(), user.cptr(), name, - staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> + staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> handleAppCallback(userData, error) { apiKey!!.pointed.let { ApiKeyWrapper( @@ -2159,7 +2156,7 @@ actual object RealmInterop { app.cptr(), user.cptr(), id.realm_object_id_t(), - staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> + staticCFunction { userData: CPointer?, apiKey: CPointer?, error: CPointer? -> handleAppCallback(userData, error) { apiKey!!.pointed.let { ApiKeyWrapper( @@ -2188,7 +2185,7 @@ actual object RealmInterop { realm_wrapper.realm_app_user_apikey_provider_client_fetch_apikeys( app.cptr(), user.cptr(), - staticCFunction { userData: CPointer?, apiKeys: CPointer?, count: size_t, error: CPointer? -> + staticCFunction { userData: CPointer?, apiKeys: CPointer?, count: size_t, error: CPointer? -> handleAppCallback(userData, error) { val result = arrayOfNulls(count.toInt()) for (i in 0 until count.toInt()) { @@ -2312,8 +2309,8 @@ actual object RealmInterop { actual fun realm_user_get_all_identities(user: RealmUserPointer): List { memScoped { val count = AuthProvider.values().size - val properties = allocArray(count) - val outCount = alloc() + val properties = allocArray(count) + val outCount: ULongVarOf = alloc() realm_wrapper.realm_user_get_all_identities( user.cptr(), properties, @@ -2407,11 +2404,11 @@ actual object RealmInterop { ) } - actual fun realm_sync_client_config_set_base_file_path( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_base_file_path( + appConfig: RealmAppConfigurationPointer, basePath: String ) { - realm_wrapper.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath) + realm_wrapper.realm_app_config_set_base_file_path(appConfig.cptr(), basePath) } actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) { @@ -2433,24 +2430,24 @@ actual object RealmInterop { realm_wrapper.realm_set_log_level(level.priority.toUInt()) } - actual fun realm_sync_client_config_set_metadata_mode( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_mode( + appConfig: RealmAppConfigurationPointer, metadataMode: MetadataMode ) { - realm_wrapper.realm_sync_client_config_set_metadata_mode( - syncClientConfig.cptr(), - realm_sync_client_metadata_mode.byValue(metadataMode.metadataValue.toUInt()) + realm_wrapper.realm_app_config_set_metadata_mode( + appConfig.cptr(), + realm_wrapper.realm_sync_client_metadata_mode.byValue(metadataMode.metadataValue.toUInt()) ) } - actual fun realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig: RealmSyncClientConfigurationPointer, + actual fun realm_app_config_set_metadata_encryption_key( + appConfig: RealmAppConfigurationPointer, encryptionKey: ByteArray ) { memScoped { val encryptionKeyPointer = encryptionKey.refTo(0).getPointer(memScope) - realm_wrapper.realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig.cptr(), + realm_wrapper.realm_app_config_set_metadata_encryption_key( + appConfig.cptr(), encryptionKeyPointer as CPointer ) } diff --git a/packages/external/core b/packages/external/core index 316889b967..bec09f89eb 160000 --- a/packages/external/core +++ b/packages/external/core @@ -1 +1 @@ -Subproject commit 316889b967f845fbc10b4422f96c7eadd47136f2 +Subproject commit bec09f89ebc9dc52596375cbf20451429ed9fe89 diff --git a/packages/jni-swig-stub/realm.i b/packages/jni-swig-stub/realm.i index 9ea8b25428..8028cd1651 100644 --- a/packages/jni-swig-stub/realm.i +++ b/packages/jni-swig-stub/realm.i @@ -1,5 +1,7 @@ %module(directors="1") realmc +#define REALM_APP_SERVICES 1 + %{ #include "realm.h" #include @@ -523,6 +525,8 @@ $result = SWIG_JavaArrayOutLonglong(jenv, (long long *)result, 2); %ignore "realm_dictionary_add_notification_callback"; %ignore "realm_results_add_notification_callback"; +%ignore "realm_app_config_get_sync_client_config"; + // Swig doesn't understand __attribute__ so eliminate it #define __attribute__(x) diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt index 08a6b9285d..1f08cb2918 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppConfigurationImpl.kt @@ -132,7 +132,7 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class) bundleId: String, networkTransport: NetworkTransport ): RealmAppConfigurationPointer { - return RealmInterop.realm_app_config_new( + val appConfigPtr = RealmInterop.realm_app_config_new( appId = appId, baseUrl = baseUrl, networkTransport = RealmInterop.realm_network_transport_new(networkTransport), @@ -146,6 +146,15 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class) frameworkVersion = RUNTIME_VERSION ) ) + RealmInterop.realm_app_config_set_base_file_path(appConfigPtr, syncRootDirectory) + RealmInterop.realm_app_config_set_metadata_mode(appConfigPtr, metadataMode) + encryptionKey?.let { + RealmInterop.realm_app_config_set_metadata_encryption_key( + appConfigPtr, + it + ) + } + return appConfigPtr } private fun initializeSyncClientConfig( @@ -157,21 +166,7 @@ public class AppConfigurationImpl @OptIn(ExperimentalKBsonSerializerApi::class) .also { syncClientConfig -> // Initialize client configuration first RealmInterop.realm_sync_client_config_set_default_binding_thread_observer(syncClientConfig, appId) - RealmInterop.realm_sync_client_config_set_metadata_mode( - syncClientConfig, - metadataMode - ) - RealmInterop.realm_sync_client_config_set_base_file_path( - syncClientConfig, - syncRootDirectory - ) - encryptionKey?.let { - RealmInterop.realm_sync_client_config_set_metadata_encryption_key( - syncClientConfig, - it - ) - } sdkInfo?.let { RealmInterop.realm_sync_client_config_set_user_agent_binding_info( diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt index fb72304c78..644176fc0f 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncUtils.kt @@ -156,11 +156,8 @@ internal fun convertAppError(appError: AppError): Throwable { ErrorCode.RLM_ERR_CLIENT_USER_NOT_FOUND -> { IllegalStateException(msg) } - ErrorCode.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN -> { - InvalidCredentialsException(msg) - } - ErrorCode.RLM_ERR_CLIENT_APP_DEALLOCATED -> { - AppException(msg) + ErrorCode.RLM_ERR_CLIENT_USER_ALREADY_NAMED ->{ + CredentialsCannotBeLinkedException(msg) } else -> { AppException(msg) diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt index 51437d237c..a57e0bdbf5 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt @@ -54,6 +54,7 @@ import kotlinx.coroutines.withTimeout import org.mongodb.kbson.ObjectId import kotlin.test.AfterTest import kotlin.test.BeforeTest +import kotlin.test.Ignore import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith @@ -84,6 +85,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun downloadProgressListener_changesOnly() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { uploadRealm -> // Verify that we: @@ -173,6 +175,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun worksAfterExceptions() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { realm -> realm.writeSampleData(TEST_SIZE, timeout = TIMEOUT) @@ -195,6 +198,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun worksAfterCancel() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { realm -> realm.writeSampleData(TEST_SIZE, timeout = TIMEOUT) @@ -225,6 +229,7 @@ class ProgressListenerTests { } @Test + @Ignore // https://github.com/realm/realm-core/issues/7627 fun triggerImmediatelyWhenRegistered() = runBlocking { Realm.open(createSyncConfig(app.createUserAndLogIn())).use { realm -> withTimeout(10.seconds) { diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt index 417c4c5516..34b69a847d 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt @@ -488,7 +488,7 @@ class UserTests { emailUser1.linkCredentials(Credentials.anonymous()) }.let { assertTrue( - it.message!!.contains("linking an anonymous identity is not allowed"), + it.message!!.contains("Cannot add anonymous credentials to an existing user"), it.message ) }