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

Unified Diff: tests/isolate/global_error_handler_stream2_test.dart

Issue 16958006: Added async_helper and fixed broken asynchronous test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months 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
« no previous file with comments | « tests/isolate/global_error_handler2_test.dart ('k') | tests/isolate/illegal_msg_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/global_error_handler_stream2_test.dart
diff --git a/tests/isolate/global_error_handler_stream2_test.dart b/tests/isolate/global_error_handler_stream2_test.dart
index b1093f5ded8d40662af0b6122f97524b4f69d1e4..85900463229bff72834c35bb2c483c34844b5434 100644
--- a/tests/isolate/global_error_handler_stream2_test.dart
+++ b/tests/isolate/global_error_handler_stream2_test.dart
@@ -7,6 +7,7 @@ library test;
import 'package:expect/expect.dart';
import 'dart:async';
import 'dart:isolate';
+import '../async_helper.dart';
runTest() {
IsolateSink mainIsolate;
@@ -37,10 +38,16 @@ main() {
// the handling of the previous event. We therefore delay the closing.
// Note: if the done is sent too early it won't lead to failing tests, but
// just won't make sure that the globalErrorHandler works.
- new Timer(const Duration(milliseconds: 10), otherIsolate.close);
+ asyncStart();
+ new Timer(const Duration(milliseconds: 10), () {
+ otherIsolate.close();
+ asyncEnd();
+ });
+ asyncStart();
box.stream.single.then((msg) {
Expect.equals("received done", msg);
timer.cancel();
keepRunningBox.stream.close();
+ asyncEnd();
});
}
« no previous file with comments | « tests/isolate/global_error_handler2_test.dart ('k') | tests/isolate/illegal_msg_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698