Commit 0fe2a31
[tests] Fix flaky standalone/io/http_auth_test
This is an attempt to fix flaky failure
```
Unhandled exception:
Exception: Fatal: asyncStart() was called even though we are done with testing.. This is most likely a bug in your test.
#0 asyncStart (package:expect/async_helper.dart:53)
#1 asyncExpectThrows (package:expect/async_helper.dart:140)
#2 testMalformedAuthenticateHeaderWithAuthHandler.<anonymous closure> (file:///C:/b/s/w/ir/tests/standalone/io/http_auth_test.dart:263)
#3 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:951)
#4 Future._propagateToListeners (dart:async/future_impl.dart:980)
#5 Future._completeWithValue (dart:async/future_impl.dart:723)
#6 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:807)
#7 _microtaskLoop (dart:async/schedule_microtask.dart:42)
#8 _startMicrotaskLoop (dart:async/schedule_microtask.dart:60)
#9 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:127)
#10 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194)
--- Re-run this test:
python3 tools/test.py -n vm-aot-win-release-x64 standalone/io/http_auth_test
```
The test has multiple calls to asyncExpectThrows which uses
asyncStart/asyncEnd, but only one top-level asyncStart/asyncEnd is
allowed.
In addition to a top-level asyncStart/asyncEnd, also add
asyncStart/asyncEnd around creation and shutdown of the server in order
to make sure all test cases are completed before test is finished.
TEST=standalone/io/http_auth_test
Change-Id: Ibb55dbae2c2e48e18f51f9a0adc24101d6121a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425600
Reviewed-by: Brian Quinlan <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>1 parent 211209b commit 0fe2a31
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| 368 | + | |
| 369 | + | |
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
| |||
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
| 382 | + | |
| 383 | + | |
377 | 384 | | |
0 commit comments