| Index: tests/standalone/src/StreamPipeTest.dart
|
| diff --git a/tests/standalone/src/StreamPipeTest.dart b/tests/standalone/src/StreamPipeTest.dart
|
| index e3779d400e4fdcaa853b6071669d8233035a3ad7..c38fa56e1c0e7b4635ad96b57c5591a7b859f0cb 100644
|
| --- a/tests/standalone/src/StreamPipeTest.dart
|
| +++ b/tests/standalone/src/StreamPipeTest.dart
|
| @@ -97,18 +97,20 @@ class PipeServerGame {
|
| // Check that the resulting file is equal to the initial
|
| // file.
|
| bool result = compareFileContent(srcFileName, dstFileName);
|
| - new File(dstFileName).deleteSync();
|
| - tempDir.deleteSync();
|
| - Expect.isTrue(result);
|
| -
|
| - _socket.close();
|
| -
|
| - // Run this twice.
|
| - if (count++ < 2) {
|
| - runTest();
|
| - } else {
|
| - shutdown();
|
| - }
|
| + fileOutput.closeHandler = () {
|
| + new File(dstFileName).deleteSync();
|
| + tempDir.deleteSync();
|
| + Expect.isTrue(result);
|
| +
|
| + _socket.close();
|
| +
|
| + // Run this twice.
|
| + if (count++ < 2) {
|
| + runTest();
|
| + } else {
|
| + shutdown();
|
| + }
|
| + };
|
| };
|
|
|
| socketInput.pipe(fileOutput);
|
|
|