| Index: pkg/scheduled_test/lib/src/utils.dart
|
| diff --git a/pkg/scheduled_test/lib/src/utils.dart b/pkg/scheduled_test/lib/src/utils.dart
|
| index 419e47eb8bc30e224f997cd5920922b9f844a36d..931c28b4a95ffba0cc8b2c473e695d17b5eaf310 100644
|
| --- a/pkg/scheduled_test/lib/src/utils.dart
|
| +++ b/pkg/scheduled_test/lib/src/utils.dart
|
| @@ -122,15 +122,16 @@ typedef void StreamCanceller();
|
| /// the wrapped stream. Unlike [StreamSubscription], this canceller will send a
|
| /// "done" message to the wrapped stream.
|
| Pair<Stream, StreamCanceller> streamWithCanceller(Stream stream) {
|
| - var controller = stream.isBroadcast ?
|
| - new StreamController.broadcast() :
|
| - new StreamController();
|
| + var controller = new StreamController();
|
| + var controllerStream = stream.isBroadcast ?
|
| + controller.stream.asBroadcastStream() :
|
| + controller.stream;
|
| var subscription = stream.listen((value) {
|
| if (!controller.isClosed) controller.add(value);
|
| }, onError: (error) {
|
| if (!controller.isClosed) controller.signalError(error);
|
| }, onDone: controller.close);
|
| - return new Pair<Stream, StreamCanceller>(controller.stream, controller.close);
|
| + return new Pair<Stream, StreamCanceller>(controllerStream, controller.close);
|
| }
|
|
|
| // TODO(nweiz): remove this when issue 7787 is fixed.
|
|
|