-
Matan Lurey authored
Fixes https://github.com/flutter/flutter/issues/141823 Before this change, when a test would fail, the terminal would hang (by default for 30s) until killed by the test runner. Basically, [`runZonedGuarded`](https://api.flutter.dev/flutter/dart-async/runZonedGuarded.html) _does_ document (though not clearly) that a returned future should not be awaited: ```txt The zone will always be an error-zone ([Zone.errorZone](https://api.flutter.dev/flutter/dart-async/Zone/errorZone.html)), so returning a future created inside the zone, and waiting for it outside of the zone, will risk the future not being seen to complete. ``` For example, you can see other places in Dart and Flutter that we circumvent that problem: - https://github.com/flutter/flutter/blob/5987563e4aecb34fca446ea804943bb8d27d8fcd/packages/flutter_tools/test/general.shard/base/async_guard_test.dart#L279-L306 - https://github.com/dart-lang/dartdoc/blob/b04c9c127fea5f3fdf600aa205f50d81d1c779c5/lib/src/dartdoc.dart#L258-L264 - https://github.com/flutter/engine/blob/d1afda52d254f5f1faf79e51fe430d912d6db3ee/lib/web_ui/dev/browser_process.dart#L20-L22 I'm open to suggestions on how to test this :) /cc @natebosch @jakemac53 @lrhn if you have any color commentary for us.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bin | ||
doc | ||
gradle | ||
ide_templates/intellij | ||
lib | ||
static | ||
templates | ||
test | ||
tool | ||
README.md | ||
analysis_options.yaml | ||
dart_test.yaml | ||
pubspec.yaml |