| Index: tests/standalone/io/http_reuse_server_port_test.dart
|
| diff --git a/tests/standalone/io/http_reuse_server_port_test.dart b/tests/standalone/io/http_reuse_server_port_test.dart
|
| index 4829eb7e03bcc951199be1e7c550a93a99f57b09..e5a35b2ef0a6cf81c005c9f1b2a602d4c5841179 100644
|
| --- a/tests/standalone/io/http_reuse_server_port_test.dart
|
| +++ b/tests/standalone/io/http_reuse_server_port_test.dart
|
| @@ -26,13 +26,18 @@ Future<int> runServer(int port, int connections, bool clean) {
|
| }
|
| });
|
|
|
| - Future.wait(new List.generate(connections, (_) {
|
| + Future
|
| + .wait(new List.generate(connections, (_) {
|
| var client = new HttpClient();
|
| - return client.get("127.0.0.1", server.port, "/")
|
| + return client
|
| + .get("127.0.0.1", server.port, "/")
|
| .then((request) => request.close())
|
| .then((response) => response.drain())
|
| - .catchError((e) { if (clean) throw e; });
|
| - })).then((_) {
|
| + .catchError((e) {
|
| + if (clean) throw e;
|
| + });
|
| + }))
|
| + .then((_) {
|
| if (clean) {
|
| int port = server.port;
|
| server.close().then((_) => completer.complete(port));
|
| @@ -42,7 +47,6 @@ Future<int> runServer(int port, int connections, bool clean) {
|
| return completer.future;
|
| }
|
|
|
| -
|
| void testReusePort() {
|
| asyncStart();
|
| runServer(0, 10, true).then((int port) {
|
| @@ -55,7 +59,6 @@ void testReusePort() {
|
| });
|
| }
|
|
|
| -
|
| void testUncleanReusePort() {
|
| asyncStart();
|
| runServer(0, 10, false).then((int port) {
|
| @@ -68,7 +71,6 @@ void testUncleanReusePort() {
|
| });
|
| }
|
|
|
| -
|
| void main() {
|
| testReusePort();
|
| testUncleanReusePort();
|
|
|