| Index: tests/lib/async/run_async4_test.dart
|
| diff --git a/tests/lib/async/run_async4_test.dart b/tests/lib/async/run_async4_test.dart
|
| index 1c105205a897b90c41c7d18dca569636abca96e8..46967dfcf1ec9b15556cd4c3c84e62569eccd2c2 100644
|
| --- a/tests/lib/async/run_async4_test.dart
|
| +++ b/tests/lib/async/run_async4_test.dart
|
| @@ -17,10 +17,6 @@ void startTest(SendPort finishPort, replyPort) {
|
| if (i == 50) throw new RuntimeError("ignore exception");
|
| });
|
| }
|
| -
|
| - // Without this Timer the isolate will freeze.
|
| - // TODO(9013): Remove this Timer.
|
| - new Timer(const Duration(seconds: 2), () { });
|
| }
|
|
|
| runTest() {
|
| @@ -33,7 +29,9 @@ bool globalErrorHandler(IsolateUnhandledException e) {
|
|
|
| main() {
|
| var port = new ReceivePort();
|
| + var timer;
|
| SendPort otherIsolate = spawnFunction(runTest, globalErrorHandler);
|
| otherIsolate.send(port.toSendPort());
|
| - port.receive((msg, replyPort) { port.close(); });
|
| -}
|
| + port.receive((msg, replyPort) { port.close(); timer.cancel(); });
|
| + timer = new Timer(const Duration(seconds: 2), () { throw "failed"; });
|
| +}
|
|
|