| Index: tests/isolate/ping_test.dart
|
| ===================================================================
|
| --- tests/isolate/ping_test.dart (revision 41942)
|
| +++ tests/isolate/ping_test.dart (working copy)
|
| @@ -24,6 +24,10 @@
|
| List result = [];
|
| completer.future.then((echoPort) {
|
| reply.handler = (v) {
|
| + if (result.isEmpty) {
|
| + // Prevent messages overtaking each other on delivery.
|
| + echoPort.send(0);
|
| + }
|
| result.add(v);
|
| if (v == 0) {
|
| Expect.listEquals(["alive", "control", "event"],
|
| @@ -38,7 +42,7 @@
|
| "control index < 2");
|
| int eventIndex = result.indexOf("event");
|
| Expect.isTrue(eventIndex > result.indexOf(2), "event index > 2");
|
| - Expect.isTrue(eventIndex < result.indexOf(1), "event index < 1");
|
| + Expect.isTrue(eventIndex < result.indexOf(0), "event index < 0");
|
| reply.close();
|
| asyncEnd();
|
| }
|
| @@ -58,7 +62,6 @@
|
| echoPort.send(2);
|
| isolate.ping(createPingPort("event"), Isolate.AS_EVENT);
|
| echoPort.send(1);
|
| - echoPort.send(0);
|
| });
|
| });
|
| }
|
|
|