[ddc] use async-helper in ddc's hot_restart_timer test

This test returned a future, which in other runtimes may mean that
the test would not be awaited for. The test-runner for DDC does include
extra asyncStart/asyncEnd to ensure the test runs to completion.
However, this sporadically caused double reporting and flaky failures
([example][1]).

This change makes the test itself track the async nature of the test,
just like we do in most other tests today.

[1]: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8766055193681740753/+/u/test_results/ignored_flaky_test_failure_logs

Change-Id: Ib0edab197db21026d38b40036a1eeaf6edff5ad6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333300
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Sigmund Cherem 2023-11-02 15:37:14 +00:00 committed by Commit Queue
parent 12e0690dfe
commit 7e8a203f1e

View file

@ -2,13 +2,16 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
import 'dart:async';
import 'dart:_runtime' as dart;
void main() async {
await timeoutTest();
await periodicTest();
void main() {
asyncTest(() async {
await timeoutTest();
await periodicTest();
});
}
Future<void> timeoutTest() async {