| Index: test/stream_channel_controller_test.dart
|
| diff --git a/test/stream_channel_controller_test.dart b/test/stream_channel_controller_test.dart
|
| index e45f09062484a7fc37256d9a9bbfb1ace4a2fd86..cf8a31b36dda85fde499fae4973f1c6e26f66ca0 100644
|
| --- a/test/stream_channel_controller_test.dart
|
| +++ b/test/stream_channel_controller_test.dart
|
| @@ -25,6 +25,17 @@ void main() {
|
| controller.foreign.sink..add(1)..add(2)..add(3)..close();
|
| expect(controller.local.stream.toList(), completion(equals([1, 2, 3])));
|
| });
|
| +
|
| + test("with allowForeignErrors: false, shuts down the connection if an "
|
| + "error is added to the foreign channel", () {
|
| + controller = new StreamChannelController(allowForeignErrors: false);
|
| +
|
| + controller.foreign.sink.addError("oh no");
|
| + expect(controller.foreign.sink.done, throwsA("oh no"));
|
| + expect(controller.foreign.stream.toList(), completion(isEmpty));
|
| + expect(controller.local.sink.done, completes);
|
| + expect(controller.local.stream.toList(), completion(isEmpty));
|
| + });
|
| });
|
|
|
| group("synchronously", () {
|
|
|