Skip to content

Commit e4e8250

Browse files
(fix) adds queue purge before starting test 'holdingQueue cancel tasks', to avoid flaky fail
1 parent d43f1ef commit e4e8250

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

example/integration_test/general_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,6 +3306,12 @@ void main() {
33063306
});
33073307

33083308
test('holdingQueue cancel tasks', () async {
3309+
// wait for all tasks to finish (there is often carry-over from the
3310+
// preceding test
3311+
while ((await FileDownloader().allTaskIds()).isNotEmpty) {
3312+
print('Waiting to clear all tasks');
3313+
await Future.delayed(const Duration(seconds: 1));
3314+
}
33093315
expect(
33103316
(await FileDownloader().configure(
33113317
globalConfig: (Config.holdingQueue, (1, null, null))))

0 commit comments

Comments
 (0)