diff --git a/app/test/features/chat/ui/sessions/chat_seen_sync_test.dart b/app/test/features/chat/ui/sessions/chat_seen_sync_test.dart index 51258f9d..7956f6e9 100644 --- a/app/test/features/chat/ui/sessions/chat_seen_sync_test.dart +++ b/app/test/features/chat/ui/sessions/chat_seen_sync_test.dart @@ -25,7 +25,9 @@ class _Device { ChatRepository(client), localStore: local, nowMillis: () => clock(), - activeAckDelay: const Duration(milliseconds: 20), + // Long enough that a loaded machine finishes `settle()` before the + // open chat acknowledges: at 20 ms the gate lost this race under load. + activeAckDelay: const Duration(milliseconds: 400), ); } @@ -129,8 +131,8 @@ void main() { expect(phone.isNew('ses_a'), isTrue); expect(web.isNew('ses_a'), isFalse); - // The open chat acknowledges once its stream goes quiet (20 ms here). - for (var i = 0; i < 100 && server.state.chatSeen['ses_a'] != 7000; i++) { + // The open chat acknowledges once its stream goes quiet (400 ms here). + for (var i = 0; i < 300 && server.state.chatSeen['ses_a'] != 7000; i++) { await Future.delayed(const Duration(milliseconds: 20)); } await settle();