Skip to content

Commit c654311

Browse files
authored
Extend synthetic test timeout (#1107)
* Extend synthetic test timeout
1 parent 79fe79c commit c654311

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

pkgs/test/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.9.4
2+
3+
* Extend the timeout for synthetic tests, e.g. `tearDownAll`.
4+
* Depend on the latest `package:test_core`.
5+
* Depend on the latest `package:test_api`.
6+
17
## 1.9.3
28

39
* Depend on the latest `package:test_core`.

pkgs/test/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 1.9.3
2+
version: 1.9.4
33
author: Dart Team <misc@dartlang.org>
44
description: A full featured library for writing and running Dart tests.
55
homepage: https://github.com/dart-lang/test/blob/master/pkgs/test
@@ -31,8 +31,8 @@ dependencies:
3131
web_socket_channel: ^1.0.0
3232
yaml: ^2.0.0
3333
# Use an exact version until the test_api and test_core package are stable.
34-
test_api: 0.2.10
35-
test_core: 0.2.14
34+
test_api: 0.2.11
35+
test_core: 0.2.15
3636

3737
dev_dependencies:
3838
fake_async: ^1.0.0

pkgs/test_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.11
2+
3+
* Extend the timeout for synthetic tests, e.g. `tearDownAll`.
4+
15
## 0.2.10
26

37
* Update to latest `package:matcher`. Improves output for instances of private

pkgs/test_api/lib/src/backend/declarer.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class Declarer {
5858
/// The set-up functions to run once for this group.
5959
final _setUpAlls = List<Function()>();
6060

61+
/// The default timeout for synthetic tests.
62+
final _timeout = Timeout(Duration(minutes: 12));
63+
6164
/// The trace for the first call to [setUpAll].
6265
///
6366
/// All [setUpAll]s are run in a single logical test, so they can only have
@@ -295,7 +298,8 @@ class Declarer {
295298
Test get _setUpAll {
296299
if (_setUpAlls.isEmpty) return null;
297300

298-
return LocalTest(_prefix("(setUpAll)"), _metadata, () {
301+
return LocalTest(_prefix("(setUpAll)"), _metadata.change(timeout: _timeout),
302+
() {
299303
return runZoned(() => Future.forEach(_setUpAlls, (setUp) => setUp()),
300304
// Make the declarer visible to running scaffolds so they can add to
301305
// the declarer's `tearDownAll()` list.
@@ -309,7 +313,8 @@ class Declarer {
309313
// dynamically add tear-down code using [addTearDownAll].
310314
if (_setUpAlls.isEmpty && _tearDownAlls.isEmpty) return null;
311315

312-
return LocalTest(_prefix("(tearDownAll)"), _metadata, () {
316+
return LocalTest(
317+
_prefix("(tearDownAll)"), _metadata.change(timeout: _timeout), () {
313318
return runZoned(() {
314319
return Invoker.current.unclosable(() async {
315320
while (_tearDownAlls.isNotEmpty) {

pkgs/test_api/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_api
2-
version: 0.2.10
2+
version: 0.2.11
33
author: Dart Team <misc@dartlang.org>
44
description: A library for writing Dart tests.
55
homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_api

pkgs/test_core/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
## 0.2.15-dev
1+
## 0.2.15
22

33
* Add a `StringSink` argument to reporters to prepare for reporting to a file.
44
* Add --test-randomize-ordering-seed` argument to randomize test
55
execution order based on a provided seed
6+
* Depend on the latest `test_api`.
67

78
## 0.2.14
89

pkgs/test_core/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_core
2-
version: 0.2.15-dev
2+
version: 0.2.15
33
author: Dart Team <misc@dartlang.org>
44
description: A basic library for writing tests and running them on the VM.
55
homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_core
@@ -32,7 +32,7 @@ dependencies:
3232
# properly constrains all features it provides.
3333
matcher: ">=0.12.6 <0.12.7"
3434
# Use an exact version until the test_api package is stable.
35-
test_api: 0.2.10
35+
test_api: 0.2.11
3636

3737
dependency_overrides:
3838
test_api:

0 commit comments

Comments
 (0)