Index: tests/standalone/io/echo_server_stream_test.dart |
diff --git a/tests/standalone/io/echo_server_stream_test.dart b/tests/standalone/io/echo_server_stream_test.dart |
index 775795c7bb8adc6353e80b95d1b1918a2103c4eb..50db4930134db2a3240807f9decadc7592096f99 100644 |
--- a/tests/standalone/io/echo_server_stream_test.dart |
+++ b/tests/standalone/io/echo_server_stream_test.dart |
@@ -27,10 +27,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() { |
@@ -135,6 +133,12 @@ class EchoServerGame { |
} |
+void startEchoServer() { |
+ var server = new EchoServer(); |
+ port.receive(server.dispatch); |
+} |
+ |
+ |
class EchoServer extends TestingServer { |
static final int MSGSIZE = EchoServerGame.MSGSIZE; |