0fe2a31b2a
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 <bquinlan@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/tree/main/docs/Testing.md.