Chromium Code Reviews| 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(); |
| } |