Close receive port in VM platform on null isolate (#2665)
This resolves flakiness in top_level_configuration_test.dart
diff --git a/pkgs/test_core/lib/src/runner/vm/platform.dart b/pkgs/test_core/lib/src/runner/vm/platform.dart
index 0f7620e..8916e77 100644
--- a/pkgs/test_core/lib/src/runner/vm/platform.dart
+++ b/pkgs/test_core/lib/src/runner/vm/platform.dart
@@ -87,7 +87,10 @@
suiteConfig.metadata,
platform.compiler,
);
- if (isolate == null) return null;
+ if (isolate == null) {
+ receivePort.close();
+ return null;
+ }
} catch (error) {
receivePort.close();
rethrow;