Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3325)

Unified Diff: tests/isolate/issue_21398_parent_isolate2_test.dart

Issue 1477043002: Fix tests that don't catch asynchronous errors from isolate spawning. Update co19 status. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/isolate/issue_21398_parent_isolate2_test.dart
diff --git a/tests/isolate/issue_21398_parent_isolate2_test.dart b/tests/isolate/issue_21398_parent_isolate2_test.dart
index 92754fd9058b0a06e6b1792e3e37c13c82034998..da94b56c17cd6981dc1454f136a62e071309570f 100644
--- a/tests/isolate/issue_21398_parent_isolate2_test.dart
+++ b/tests/isolate/issue_21398_parent_isolate2_test.dart
@@ -9,6 +9,7 @@
import 'dart:isolate';
import 'dart:async';
import "package:expect/expect.dart";
+import 'package:async_helper/async_helper.dart';
import "deferred_loaded_lib.dart" deferred as lib;
@@ -27,6 +28,7 @@ funcChild(args) {
void helperFunction() {
var receivePort = new ReceivePort();
+ asyncStart();
// Spawn an isolate using spawnFunction.
Isolate.spawn(funcChild, [receivePort.sendPort]).then(
@@ -36,12 +38,14 @@ void helperFunction() {
// We don't expect to receive any valid messages.
Expect.fail("We don't expect to receive any valid messages");
receivePort.close();
+ asyncEnd();
},
onError: (e) {
// We don't expect to receive any error messages, per spec listen
// does not receive an error object.
Expect.fail("We don't expect to receive any error messages");
receivePort.close();
+ asyncEnd();
}
);
}
« no previous file with comments | « tests/isolate/issue_21398_parent_isolate1_test.dart ('k') | tests/isolate/issue_21398_parent_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698