Index: tests/standalone/io/http_server_close_response_after_error_test.dart |
diff --git a/tests/standalone/io/http_server_close_response_after_error_test.dart b/tests/standalone/io/http_server_close_response_after_error_test.dart |
index f768325960eaeeab4899f42d50f5f1162a5d6b4c..9230177cc66abf4985c2f848bee288c50923e903 100644 |
--- a/tests/standalone/io/http_server_close_response_after_error_test.dart |
+++ b/tests/standalone/io/http_server_close_response_after_error_test.dart |
@@ -14,24 +14,18 @@ import 'dart:io'; |
const CLIENT_SCRIPT = "http_server_close_response_after_error_client.dart"; |
void main() { |
- HttpServer.bind("127.0.0.1", 0) |
- .then((server) { |
- server.listen( |
- (request) { |
- request.listen( |
- null, |
- onError: (e) {}, |
- onDone: () { |
- request.response.close(); |
- }); |
- }); |
- Process.run(Platform.executable, |
- [Platform.script.resolve(CLIENT_SCRIPT).toString(), |
- server.port.toString()]) |
- .then((result) { |
- if (result.exitCode != 0) throw "Bad exit code"; |
- server.close(); |
- }); |
+ HttpServer.bind("127.0.0.1", 0).then((server) { |
+ server.listen((request) { |
+ request.listen(null, onError: (e) {}, onDone: () { |
+ request.response.close(); |
}); |
+ }); |
+ Process.run(Platform.executable, [ |
+ Platform.script.resolve(CLIENT_SCRIPT).toString(), |
+ server.port.toString() |
+ ]).then((result) { |
+ if (result.exitCode != 0) throw "Bad exit code"; |
+ server.close(); |
+ }); |
+ }); |
} |
- |