Index: dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart |
diff --git a/dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart b/dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart |
index daefc46e3818cd5906b774565f465b1a7b0e8df9..c7551d2b08f55fdd60e84b3c5e08f396760daabd 100644 |
--- a/dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart |
+++ b/dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart |
@@ -30,13 +30,12 @@ main() { |
ReceivePort port = new ReceivePort(); |
Isolate.spawn(isolate, port.sendPort); |
Completer completer = new Completer(); |
- port.listen((message) { |
+ port.first.then((message) { |
if (message == SUCCESS) { |
completer.complete(null); |
} else { |
completer.completeError(message); |
} |
- port.close(); |
}); |
asyncTest(() => completer.future); |