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

Unified Diff: tests/standalone/io/raw_server_socket_cancel_test.dart

Issue 23886004: Update dart:io tests to use asyncStart/asyncEnd (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 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/standalone/io/raw_secure_server_socket_test.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_server_socket_cancel_test.dart
diff --git a/tests/standalone/io/raw_server_socket_cancel_test.dart b/tests/standalone/io/raw_server_socket_cancel_test.dart
index 32795279597fe5794b6d7a39241caff9143d49d7..a10d17933b1eb93100296aae778bfc50d10ab05f 100644
--- a/tests/standalone/io/raw_server_socket_cancel_test.dart
+++ b/tests/standalone/io/raw_server_socket_cancel_test.dart
@@ -7,10 +7,11 @@
// VMOptions=--short_socket_write
// VMOptions=--short_socket_read --short_socket_write
-import "package:expect/expect.dart";
import "dart:async";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
void testCancelResubscribeServerSocket(int socketCount, int backlog) {
var acceptCount = 0;
@@ -18,14 +19,14 @@ void testCancelResubscribeServerSocket(int socketCount, int backlog) {
var errorCount = 0;
var earlyErrorCount = 0;
- ReceivePort port = new ReceivePort();
+ asyncStart();
RawServerSocket.bind("127.0.0.1", 0, backlog: backlog).then((server) {
Expect.isTrue(server.port > 0);
void checkDone() {
if (doneCount + errorCount + earlyErrorCount == socketCount) {
- port.close();
+ asyncEnd();
// Be sure to close as subscription.cancel may not be called, if
// backlog prevents acceptCount to grow to socketCount / 2.
server.close();
« no previous file with comments | « tests/standalone/io/raw_secure_server_socket_test.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698