| Index: tests/isolate/issue_21398_parent_isolate_test.dart
|
| diff --git a/tests/isolate/issue_21398_parent_isolate_test.dart b/tests/isolate/issue_21398_parent_isolate_test.dart
|
| index fb4b0fb6fd0ba3a7a44de11c89cb74ae1956a4d2..76e7e0d4436b57a3762453270ec48b04215e6650 100644
|
| --- a/tests/isolate/issue_21398_parent_isolate_test.dart
|
| +++ b/tests/isolate/issue_21398_parent_isolate_test.dart
|
| @@ -9,6 +9,7 @@
|
| import 'dart:isolate';
|
| import 'dart:async';
|
| import "package:expect/expect.dart";
|
| +import 'package:async_helper/async_helper.dart';
|
|
|
| class FromMainIsolate {
|
| String toString() => 'from main isolate';
|
| @@ -29,13 +30,16 @@ main() {
|
|
|
| // First spawn an isolate using spawnURI and have it
|
| // send back a "non-literal" like object.
|
| + asyncStart();
|
| Isolate.spawnUri(Uri.parse('issue_21398_child_isolate.dart'),
|
| [],
|
| [new FromMainIsolate(), receive1.sendPort]).catchError(
|
| (error) {
|
| Expect.isTrue(error is ArgumentError);
|
| + asyncEnd();
|
| }
|
| );
|
| + asyncStart();
|
| Isolate.spawnUri(Uri.parse('issue_21398_child_isolate.dart'),
|
| [],
|
| receive1.sendPort).then(
|
| @@ -44,6 +48,7 @@ main() {
|
| (msg) {
|
| Expect.stringEquals(msg, "Invalid Argument(s).");
|
| receive1.close();
|
| + asyncEnd();
|
| },
|
| onError: (e) => print('$e')
|
| );
|
| @@ -53,7 +58,8 @@ main() {
|
| // Now spawn an isolate using spawnFunction and send it a "non-literal"
|
| // like object and also have the child isolate send back a "non-literal"
|
| // like object.
|
| - Isolate.spawn(funcChild,
|
| + asyncStart();
|
| + Isolate.spawn(funcChild,
|
| [new FromMainIsolate(), receive2.sendPort]).then(
|
| (isolate) {
|
| receive2.listen(
|
| @@ -61,6 +67,7 @@ main() {
|
| Expect.isTrue(msg is FromMainIsolate);
|
| Expect.equals(10, msg.fld);
|
| receive2.close();
|
| + asyncEnd();
|
| },
|
| onError: (e) => print('$e')
|
| );
|
|
|