Files
sdk/tests
Martin Kustermann 0aa481ad94 [gardening] Call initial asyncStart() and final asyncEnd()
The asyncStart/asyncEnd implementation maintains a counter that will
signify to the test framework the test is done as soon as the counter
reaches 0 again.

This means we have to ensure the counter is >0 as long as any test is
running.

The standalone/io/http_client_connect_test wasn't doing that as it has
code like this

  main() async {
    ...
    await foo();
    await bar();
    ...
  }
  foo() async {
    asyncStart();
    ...
    asyncEnd();
  }
  bar() async {
    asyncStart();
    ...
    asyncEnd();
  }

So the test is considered done after the `await foo()` decremented the
counter back to 0.

TEST=Fixes flaky standalone{,_2}/io/http_client_connect_test on iso-stress builder

Change-Id: I71a89d740a814df7364153ef79bad9dd85dc9b3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327862
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-09-26 11:41:03 +00:00
..
2023-09-19 20:59:33 +00:00
2023-09-19 20:59:33 +00:00
2022-12-19 12:56:47 +00:00

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.