Index: tests/standalone/io/secure_socket_test.dart |
diff --git a/tests/standalone/io/secure_socket_test.dart b/tests/standalone/io/secure_socket_test.dart |
index 1566b5a38a277866a8f4df72e91fbcc3b9a48b8b..bf128df0604d9c0373c5f0c5e8e3041ec30810f1 100644 |
--- a/tests/standalone/io/secure_socket_test.dart |
+++ b/tests/standalone/io/secure_socket_test.dart |
@@ -50,6 +50,7 @@ Future<HttpServer> startServer(String certType, String password) { |
Future test(String certType, String password) { |
List<int> body = <int>[]; |
+ Completer completer = new Completer(); |
startServer(certType, password).then((server) { |
SecureSocket.connect( |
"localhost", server.port, context: clientContext(certType, password)) |
@@ -65,14 +66,17 @@ Future test(String certType, String password) { |
Expect.equals(72, body[0]); |
Expect.equals(9, body[body.length - 1]); |
server.close(); |
+ completer.complete(null); |
}, |
onError: (e, trace) { |
String msg = "Unexpected error $e"; |
if (trace != null) msg += "\nStackTrace: $trace"; |
Expect.fail(msg); |
+ completer.complete(null); |
}); |
}); |
}); |
+ return completer.future; |
} |
main() async { |