Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion test/features/disputes/dispute_chat_duplicate_envelope_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,17 @@ void main() {

nostrService.controller.add(forged);
nostrService.controller.add(real);
await pumpEventQueue(times: 200);
// Unwrapping runs through Isolate.run: wait on the observable condition
// (bounded) instead of a microtask pump count, which cannot see cross-
// isolate port replies.
final deadline = DateTime.now().add(const Duration(seconds: 5));
while (container
.read(disputeChatNotifierProvider(disputeId))
.messages
.isEmpty &&
DateTime.now().isBefore(deadline)) {
await Future<void>.delayed(const Duration(milliseconds: 20));
}

final messages =
container.read(disputeChatNotifierProvider(disputeId)).messages;
Expand Down
Loading