Index: tests/standalone/io/raw_secure_server_closing_test.dart |
diff --git a/tests/standalone/io/raw_secure_server_closing_test.dart b/tests/standalone/io/raw_secure_server_closing_test.dart |
index 11e641b557c4470311a4cfee9b318d5aa052b858..51e1ab223f713ba660017def7fe199c250786f95 100644 |
--- a/tests/standalone/io/raw_secure_server_closing_test.dart |
+++ b/tests/standalone/io/raw_secure_server_closing_test.dart |
@@ -12,6 +12,7 @@ import "dart:async"; |
import "dart:io"; |
import "dart:isolate"; |
+const SERVER_ADDRESS = "127.0.0.1"; |
const HOST_NAME = "localhost"; |
const CERTIFICATE = "localhost_cert"; |
@@ -24,7 +25,7 @@ void testCloseOneEnd(String toClose) { |
.then((_) { |
port.close(); |
}); |
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) { |
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((server) { |
server.listen((serverConnection) { |
serverConnection.listen((event) { |
if (toClose == "server" || event == RawSocketEvent.READ_CLOSED) { |
@@ -54,7 +55,7 @@ void testCloseOneEnd(String toClose) { |
void testCloseBothEnds() { |
ReceivePort port = new ReceivePort(); |
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) { |
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((server) { |
var clientEndFuture = RawSecureSocket.connect(HOST_NAME, server.port); |
server.listen((serverEnd) { |
clientEndFuture.then((clientEnd) { |
@@ -74,7 +75,7 @@ testPauseServerSocket() { |
ReceivePort port = new ReceivePort(); |
- RawSecureServerSocket.bind(HOST_NAME, |
+ RawSecureServerSocket.bind(SERVER_ADDRESS, |
0, |
2 * socketCount, |
CERTIFICATE).then((server) { |
@@ -116,7 +117,7 @@ testCloseServer() { |
ReceivePort port = new ReceivePort(); |
List ends = []; |
- RawSecureServerSocket.bind(HOST_NAME, 0, 15, CERTIFICATE).then((server) { |
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 15, CERTIFICATE).then((server) { |
Expect.isTrue(server.port > 0); |
void checkDone() { |
if (ends.length < 2 * socketCount) return; |