public void ConcatAll_must_on_OnError_on_open_substream_cancel_the_master_stream_and_signal_error()
{
this.AssertAllStagesStopped(() =>
{
var publisher = TestPublisher.CreateManualProbe<Source<int, NotUsed>>(this);
var subscriber = TestSubscriber.CreateManualProbe<int>(this);
Source.FromPublisher(publisher)
.ConcatMany(x => x)
.To(Sink.FromSubscriber(subscriber))
.Run(Materializer);
var upstream = publisher.ExpectSubscription();
var downstream = subscriber.ExpectSubscription();
downstream.Request(1000);
var substreamPublisher = TestPublisher.CreateManualProbe<int>(this);
var substreamFlow = Source.FromPublisher(substreamPublisher);
upstream.ExpectRequest();
upstream.SendNext(substreamFlow);
var subUpstream = substreamPublisher.ExpectSubscription();
subUpstream.SendError(TestException);
subscriber.ExpectError().Should().Be(TestException);
upstream.ExpectCancellation();
}, Materializer);
}