Skip to content
Merged
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
7 changes: 6 additions & 1 deletion pkgs/watcher/test/directory_watcher/windows_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,12 @@ void main() {
}

// Events only happen when there is an async gap, wait for such a gap.
await Future<void>.delayed(const Duration(milliseconds: 10));
// The event usually arrives in under 10ms, try for 100ms.
var tries = 0;
while (errorsSeen == 0 && eventsSeen == 0 && tries < 10) {
await Future<void>.delayed(const Duration(milliseconds: 10));
++tries;
}

// If everything is going well, there should have been either one event
// seen or one error seen.
Expand Down
Loading