diff --git a/test/client_reset_test.dart b/test/client_reset_test.dart index f43c21fa3..61138cfc5 100644 --- a/test/client_reset_test.dart +++ b/test/client_reset_test.dart @@ -35,21 +35,21 @@ Future main([List? args]) async { expect( Configuration.flexibleSync( user, - [Task.schema, Schedule.schema], + syncSchema, clientResetHandler: ManualRecoveryHandler((syncError) {}), ).clientResetHandler.clientResyncMode, ClientResyncModeInternal.manual); expect( Configuration.flexibleSync( user, - [Task.schema, Schedule.schema], + syncSchema, clientResetHandler: const DiscardUnsyncedChangesHandler(), ).clientResetHandler.clientResyncMode, ClientResyncModeInternal.discardLocal); expect( Configuration.flexibleSync( user, - [Task.schema, Schedule.schema], + syncSchema, clientResetHandler: const RecoverUnsyncedChangesHandler(), ).clientResetHandler.clientResyncMode, ClientResyncModeInternal.recover); @@ -57,12 +57,12 @@ Future main([List? args]) async { expect( Configuration.flexibleSync( user, - [Task.schema, Schedule.schema], + syncSchema, clientResetHandler: const RecoverOrDiscardUnsyncedChangesHandler(), ).clientResetHandler.clientResyncMode, ClientResyncModeInternal.recoverOrDiscard); - expect(Configuration.flexibleSync(user, [Task.schema, Schedule.schema]).clientResetHandler.clientResyncMode, ClientResyncModeInternal.recoverOrDiscard); + expect(Configuration.flexibleSync(user, syncSchema).clientResetHandler.clientResyncMode, ClientResyncModeInternal.recoverOrDiscard); }); baasTest('ManualRecoveryHandler error is reported in callback', (appConfig) async { diff --git a/test/configuration_test.dart b/test/configuration_test.dart index 2c611e9d8..831c181e3 100644 --- a/test/configuration_test.dart +++ b/test/configuration_test.dart @@ -586,7 +586,7 @@ Future main([List? args]) async { List key = List.generate(encryptionKeySize + 10, (i) => random.nextInt(256)); expect( - () => Configuration.flexibleSync(user, [Task.schema], encryptionKey: key), + () => Configuration.flexibleSync(user, syncSchema, encryptionKey: key), throws("Wrong encryption key size"), ); }); diff --git a/test/realm_test.dart b/test/realm_test.dart index 857a64fc7..72c22d58c 100644 --- a/test/realm_test.dart +++ b/test/realm_test.dart @@ -1000,7 +1000,7 @@ Future main([List? args]) async { final realm = getRealm(configuration); expect(realm.isClosed, false); expect( - () => getRealm(Configuration.flexibleSync(user, [Task.schema])), + () => getRealm(Configuration.flexibleSync(user, syncSchema)), throws("already opened with a different encryption key"), ); }); @@ -1737,7 +1737,7 @@ Future main([List? args]) async { // Create another user's realm and download the data var anotherUser = await app.logIn(Credentials.anonymous(reuseCredentials: false)); - final anotherUserRealm = getRealm(Configuration.flexibleSync(anotherUser, [Product.schema])); + final anotherUserRealm = getRealm(Configuration.flexibleSync(anotherUser, syncSchema)); await _addSubscriptions(anotherUserRealm, productNamePrefix); await anotherUserRealm.syncSession.waitForUpload(); await anotherUserRealm.syncSession.waitForDownload(); diff --git a/test/subscription_test.dart b/test/subscription_test.dart index e6f0de5ce..48623ded8 100644 --- a/test/subscription_test.dart +++ b/test/subscription_test.dart @@ -478,8 +478,8 @@ Future main([List? args]) async { final userX = await appX.logIn(credentials); final userY = await appY.logIn(credentials); - final realmX = getRealm(Configuration.flexibleSync(userX, [Task.schema])); - final realmY = getRealm(Configuration.flexibleSync(userY, [Task.schema])); + final realmX = getRealm(Configuration.flexibleSync(userX, syncSchema)); + final realmY = getRealm(Configuration.flexibleSync(userY, syncSchema)); realmX.subscriptions.update((mutableSubscriptions) { mutableSubscriptions.add(realmX.all());