Index: tests/standalone/io/socket_many_connections_test.dart |
diff --git a/tests/standalone/io/socket_many_connections_test.dart b/tests/standalone/io/socket_many_connections_test.dart |
index b536401e7825c26c6c89c686a7c06d4beddb2cd8..98e05cddf3cf6e5b3b3a7b0030697ecaf8bb6de7 100644 |
--- a/tests/standalone/io/socket_many_connections_test.dart |
+++ b/tests/standalone/io/socket_many_connections_test.dart |
@@ -17,10 +17,8 @@ class SocketManyConnectionsTest { |
_sendPort = null, |
_connections = 0, |
_sockets = new List<Socket>(CONNECTIONS) { |
- new TestServer().spawn().then((SendPort port) { |
- _sendPort = port; |
- start(); |
- }); |
+ _sendPort = spawnFunction(startTestServer); |
+ start(); |
} |
void run() { |
@@ -65,6 +63,12 @@ class SocketManyConnectionsTest { |
int _connections; |
} |
+ |
+void startTestServer() { |
+ var server = new TestServer(); |
+ port.receive(server.dispatch); |
+} |
+ |
class TestServer extends TestingServer { |
void onConnection(Socket connection) { |