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

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

Issue 14690009: Make Completers asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
Index: tests/standalone/io/http_server_early_client_close_test.dart
diff --git a/tests/standalone/io/http_server_early_client_close_test.dart b/tests/standalone/io/http_server_early_client_close_test.dart
index c4ec24404591e885a4b454eb2f73b92474e2c47c..2314c3f21f5ab67edc408da35fb5be3bc1d549a8 100644
--- a/tests/standalone/io/http_server_early_client_close_test.dart
+++ b/tests/standalone/io/http_server_early_client_close_test.dart
@@ -125,6 +125,35 @@ testEarlyClose2() {
if (++count < 10) {
makeRequest();
} else {
+ runAsync(server.close);
+ }
+ });
+ });
+ }
+ makeRequest();
+ });
+}
+
+testEarlyClose2b() {
Anders Johnsen 2013/05/06 07:44:42 Florian, This test is already flaky. We have it t
floitsch 2013/05/06 15:14:45 Extracted it into a separate file and marked it as
+ HttpServer.bind("127.0.0.1", 0).then((server) {
+ server.listen(
+ (request) {
+ String name = new Options().script;
+ new File(name).openRead().pipe(request.response)
+ .catchError((e) { /* ignore */ });
+ });
+
+ var count = 0;
+ makeRequest() {
+ Socket.connect("127.0.0.1", server.port).then((socket) {
+ var data = "GET / HTTP/1.1\r\nContent-Length: 0\r\n\r\n";
+ socket.write(data);
+ socket.close();
+ socket.done.then((_) {
+ socket.destroy();
+ if (++count < 10) {
+ makeRequest();
+ } else {
server.close();
}
});
@@ -162,5 +191,6 @@ void testEarlyClose3() {
void main() {
testEarlyClose1();
testEarlyClose2();
+ // testEarlyClose2b();
Lasse Reichstein Nielsen 2013/05/06 06:49:11 Commented code?
floitsch 2013/05/06 15:14:45 I asked Anders to look into it. This test started
testEarlyClose3();
}

Powered by Google App Engine
This is Rietveld 408576698