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

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

Issue 12431008: dart:io | Fix error in raw_server_socket_cancel_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Keep suppression of flaky test on all platforms. Created 7 years, 10 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 | « no previous file | no next file » | 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 ea82242d0f1d3975b9a8b2ef9c0ae25daeac48c6..5f0186e1ff6e575c898a0d6bca72f1d902297ec5 100644
--- a/tests/standalone/io/raw_server_socket_cancel_test.dart
+++ b/tests/standalone/io/raw_server_socket_cancel_test.dart
@@ -16,6 +16,7 @@ void testCancelResubscribeServerSocket(int socketCount, int backlog) {
var doneCount = 0;
var closeCount = 0;
var errorCount = 0;
+ var earlyErrorCount = 0;
ReceivePort port = new ReceivePort();
@@ -23,8 +24,8 @@ void testCancelResubscribeServerSocket(int socketCount, int backlog) {
Expect.isTrue(server.port > 0);
void checkDone() {
- if (doneCount == socketCount &&
- closeCount + errorCount == socketCount) {
+ if (doneCount + earlyErrorCount == socketCount &&
+ closeCount + errorCount + earlyErrorCount == socketCount) {
port.close();
}
}
@@ -90,7 +91,7 @@ void testCancelResubscribeServerSocket(int socketCount, int backlog) {
});
}).catchError((e) {
// "Connection actively refused by host" errors are handled here.
- errorCount++;
+ earlyErrorCount++;
checkDone();
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698