Skip to content

Commit

Permalink
test: add timeout in matrix test
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasn committed Dec 9, 2024
1 parent dbff4de commit da82330
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integration_test/matrix_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ void main() {
const testPasswordEnv = 'TEST_PASSWORD';
const testSlowNetworkEnv = 'SLOW_NETWORK';

getIt.registerSingleton<LoggingDb>(LoggingDb(inMemoryDatabase: true));

// create separate databases for each simulated device & suppress warning
drift.driftRuntimeOptions.dontWarnAboutMultipleDatabases = true;

Expand Down Expand Up @@ -119,11 +121,12 @@ void main() {

getIt
..registerSingleton<Directory>(docDir)
..registerSingleton<LoggingDb>(LoggingDb(inMemoryDatabase: true))
..registerSingleton<JournalDb>(JournalDb(inMemoryDatabase: true))
..registerSingleton<SettingsDb>(SettingsDb(inMemoryDatabase: true))
..registerSingleton<SecureStorage>(secureStorageMock);

await Future<void>.delayed(const Duration(seconds: 1));

when(() => mockSettingsDb.itemByKey(any())).thenAnswer((_) async => null);
when(() => mockSettingsDb.saveSettingsItem(any(), any()))
.thenAnswer((_) async => 0);
Expand Down

0 comments on commit da82330

Please sign in to comment.