Index: tests/standalone/io/echo_server_test.dart |
diff --git a/tests/standalone/io/echo_server_test.dart b/tests/standalone/io/echo_server_test.dart |
index d197369799fe25787be5eef312237b0f3bdbe700..3ec8112560d1ddbad87a5b22fb23c812be3a2fb5 100644 |
--- a/tests/standalone/io/echo_server_test.dart |
+++ b/tests/standalone/io/echo_server_test.dart |
@@ -35,10 +35,8 @@ class EchoServerGame { |
for (int i = 0; i < MSGSIZE; i++) { |
_buffer[i] = FIRSTCHAR + i; |
} |
- new EchoServer().spawn().then((SendPort port) { |
- _sendPort = port; |
- start(); |
- }); |
+ _sendPort = spawnFunction(startEchoServer); |
+ start(); |
} |
void sendData() { |
@@ -129,6 +127,12 @@ class EchoServerGame { |
int _messages; |
} |
+ |
+void startEchoServer() { |
+ var server = new EchoServer(); |
+ port.receive(server.dispatch); |
+} |
+ |
class EchoServer extends TestingServer { |
static final msgSize = EchoServerGame.MSGSIZE; |