diff --git a/integration_test/matrix_service_test.dart b/integration_test/matrix_service_test.dart index ad0d124ea..60aeaa1d9 100644 --- a/integration_test/matrix_service_test.dart +++ b/integration_test/matrix_service_test.dart @@ -40,6 +40,8 @@ void main() { const testPasswordEnv = 'TEST_PASSWORD'; const testSlowNetworkEnv = 'SLOW_NETWORK'; + getIt.registerSingleton(LoggingDb(inMemoryDatabase: true)); + // create separate databases for each simulated device & suppress warning drift.driftRuntimeOptions.dontWarnAboutMultipleDatabases = true; @@ -119,11 +121,12 @@ void main() { getIt ..registerSingleton(docDir) - ..registerSingleton(LoggingDb(inMemoryDatabase: true)) ..registerSingleton(JournalDb(inMemoryDatabase: true)) ..registerSingleton(SettingsDb(inMemoryDatabase: true)) ..registerSingleton(secureStorageMock); + await Future.delayed(const Duration(seconds: 1)); + when(() => mockSettingsDb.itemByKey(any())).thenAnswer((_) async => null); when(() => mockSettingsDb.saveSettingsItem(any(), any())) .thenAnswer((_) async => 0);