Migrated http_connection_info_test.dart from SDK standalone tests. (#30)
* Migrated http_connection_info_test.dart from SDK standalone tests.
diff --git a/test/http_connection_info_test.dart b/test/http_connection_info_test.dart
index 58798c7..3ce625d 100644
--- a/test/http_connection_info_test.dart
+++ b/test/http_connection_info_test.dart
@@ -3,13 +3,12 @@
// BSD-style license that can be found in the LICENSE file.
import "dart:async";
-import "dart:io" hide HttpServer, HttpClient;
-
+import "dart:io" show InternetAddress;
import "package:http_io/http_io.dart";
import "package:test/test.dart";
Future<Null> testHttpConnectionInfo() {
- Completer<Null> completer = new Completer();
+ final completer = new Completer<Null>();
HttpServer.bind("0.0.0.0", 0).then((server) {
int clientPort;
@@ -39,7 +38,7 @@
response.listen((_) {}, onDone: () {
client.close();
server.close();
- completer.complete(null);
+ completer.complete();
});
});
});
@@ -47,7 +46,5 @@
}
void main() {
- test("HttpConnectionInfo", () async {
- await testHttpConnectionInfo();
- });
+ test('HttpConnectionInfo', () => testHttpConnectionInfo());
}