Commit 5d50249
committed
fix: Flaky 'allTasks' integration test due to race condition
The integration test 'allTasks and allTaskIds with allGroups set to true'
in `general_test.dart` was flaky because the default download task
(using `https://google.com`) completed too quickly, often finishing
before the `allTasks()` assertion could execute. This resulted in an
empty list of tasks and a test failure.
This change updates the test to use `urlWithContentLength` (a ~5MB file)
to ensure the download takes sufficient time, keeping the tasks in an
active state (enqueued/running) during the assertions.
Addresses the race condition where `allTasks` returned 0 active tasks
instead of the expected 2.1 parent 5568eb4 commit 5d50249
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| |||
0 commit comments