From c08259df0f1d9d5ca6912b613c54aee1b1795e68 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 6 Mar 2024 23:12:31 +0000 Subject: [PATCH] Try letting the IsolateChannel close the RecievePort The `IsolateChannel` should close the receive port when we call `outerChannel.sink.close` which is also added to the `cleanupCallbacks`. This was originally added in #1280 to try to fix cases where the test runner could hang after running some tests specifically on the test runner CI when running the test as a subprocess. That PR went through changes closing a number of ports speculatively, and this was one likely not necessary. --- pkgs/test_core/lib/src/runner/vm/platform.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/test_core/lib/src/runner/vm/platform.dart b/pkgs/test_core/lib/src/runner/vm/platform.dart index 997595b8f..aa4eeb81a 100644 --- a/pkgs/test_core/lib/src/runner/vm/platform.dart +++ b/pkgs/test_core/lib/src/runner/vm/platform.dart @@ -80,9 +80,7 @@ class VMPlatform extends PlatformPlugin { rethrow; } outerChannel = MultiChannel(IsolateChannel.connectReceive(receivePort)); - cleanupCallbacks - ..add(receivePort.close) - ..add(isolate.kill); + cleanupCallbacks.add(isolate.kill); } cleanupCallbacks.add(outerChannel.sink.close);