diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index d811e268a..66e58798a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -13,7 +13,6 @@ defaults: shell: bash env: PUB_ENVIRONMENT: bot.github - FORCE_TEST_EXIT: true jobs: job_001: diff --git a/mono_repo.yaml b/mono_repo.yaml index dc1264e8c..6f8a7da44 100644 --- a/mono_repo.yaml +++ b/mono_repo.yaml @@ -2,8 +2,6 @@ self_validate: analyze_and_format github: - env: - FORCE_TEST_EXIT: true # Setting just `cron` keeps the defaults for `push` and `pull_request` cron: '0 0 * * 0' # “At 00:00 (UTC) on Sunday.” on_completion: diff --git a/pkgs/test/CHANGELOG.md b/pkgs/test/CHANGELOG.md index c527a3a20..66b7a00da 100644 --- a/pkgs/test/CHANGELOG.md +++ b/pkgs/test/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.17.10-dev + ## 1.17.9 * Fix a bug where a tag level configuration would cause test suites with that diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml index c057e5c35..be4babaff 100644 --- a/pkgs/test/pubspec.yaml +++ b/pkgs/test/pubspec.yaml @@ -1,5 +1,5 @@ name: test -version: 1.17.9 +version: 1.17.10-dev description: >- A full featured library for writing and running Dart tests across platforms. repository: https://github.com/dart-lang/test/blob/master/pkgs/test @@ -34,7 +34,7 @@ dependencies: yaml: ^3.0.0 # Use an exact version until the test_api and test_core package are stable. test_api: 0.4.1 - test_core: 0.3.29 + test_core: 0.3.30 dev_dependencies: fake_async: ^1.0.0 diff --git a/pkgs/test/test/runner/runner_test.dart b/pkgs/test/test/runner/runner_test.dart index 66d4fe4c0..0386fbfef 100644 --- a/pkgs/test/test/runner/runner_test.dart +++ b/pkgs/test/test/runner/runner_test.dart @@ -714,8 +714,7 @@ void main(List args) async { test.completeShutdown(); }''').create(); var test = await runDart(['runner.dart', '--no-color', '--', 'test.dart'], - description: 'dart runner.dart -- test.dart', - environment: {'FORCE_TEST_EXIT': 'false'}); + description: 'dart runner.dart -- test.dart'); expect( test.stdout, emitsThrough(containsInOrder([ diff --git a/pkgs/test_core/CHANGELOG.md b/pkgs/test_core/CHANGELOG.md index 60ad7425e..1a6935912 100644 --- a/pkgs/test_core/CHANGELOG.md +++ b/pkgs/test_core/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.30-dev + +* Remove support for `FORCE_TEST_EXIT`. + ## 0.3.29 * Fix a bug where a tag level configuration would cause test suites with that diff --git a/pkgs/test_core/lib/src/executable.dart b/pkgs/test_core/lib/src/executable.dart index 309bdedfe..23fcd33fe 100644 --- a/pkgs/test_core/lib/src/executable.dart +++ b/pkgs/test_core/lib/src/executable.dart @@ -166,12 +166,6 @@ Future _execute(List args) async { await runner?.close(); } - // TODO(grouma) - figure out why the executable can hang in the travis - // environment. https://github.com/dart-lang/test/issues/599 - if (Platform.environment['FORCE_TEST_EXIT'] == 'true') { - exit(exitCode); - } - return; } diff --git a/pkgs/test_core/lib/src/runner/spawn_hybrid.dart b/pkgs/test_core/lib/src/runner/spawn_hybrid.dart index 28928284a..9b5b4a8e3 100644 --- a/pkgs/test_core/lib/src/runner/spawn_hybrid.dart +++ b/pkgs/test_core/lib/src/runner/spawn_hybrid.dart @@ -54,6 +54,7 @@ StreamChannel spawnHybridUri(String url, Object? message, Suite suite) { var disconnector = Disconnector(); onExitPort.listen((_) { disconnector.disconnect(); + port.close(); onExitPort.close(); }); @@ -62,6 +63,7 @@ StreamChannel spawnHybridUri(String url, Object? message, Suite suite) { .transformSink(StreamSinkTransformer.fromHandlers(handleDone: (sink) { // If the user closes the stream channel, kill the isolate. isolate.kill(); + port.close(); onExitPort.close(); sink.close(); })); diff --git a/pkgs/test_core/lib/src/runner/vm/platform.dart b/pkgs/test_core/lib/src/runner/vm/platform.dart index 636792d37..9b001cab0 100644 --- a/pkgs/test_core/lib/src/runner/vm/platform.dart +++ b/pkgs/test_core/lib/src/runner/vm/platform.dart @@ -63,6 +63,7 @@ class VMPlatform extends PlatformPlugin { StreamSubscription? eventSub; var channel = IsolateChannel.connectReceive(receivePort) .transformStream(StreamTransformer.fromHandlers(handleDone: (sink) { + receivePort.close(); isolate!.kill(); eventSub?.cancel(); client?.dispose(); diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml index 7258db508..24878e187 100644 --- a/pkgs/test_core/pubspec.yaml +++ b/pkgs/test_core/pubspec.yaml @@ -1,5 +1,5 @@ name: test_core -version: 0.3.29 +version: 0.3.30-dev description: A basic library for writing tests and running them on the VM. homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_core