public void A_Broadcast_must_produce_to_other_even_though_downstream_cancels()
{
this.AssertAllStagesStopped(() =>
{
var c1 = TestSubscriber.CreateManualProbe<int>(this);
var c2 = TestSubscriber.CreateManualProbe<int>(this);
RunnableGraph.FromGraph(GraphDsl.Create(b =>
{
var broadcast = b.Add(new Broadcast<int>(2));
var source = Source.From(Enumerable.Range(1, 3));
b.From(source).To(broadcast.In);
b.From(broadcast.Out(0))
.Via(Flow.Create<int>())
.To(Sink.FromSubscriber(c1));
b.From(broadcast.Out(1))
.Via(Flow.Create<int>())
.To(Sink.FromSubscriber(c2));
return ClosedShape.Instance;
})).Run(Materializer);
var sub1 = c1.ExpectSubscription();
sub1.Cancel();
var sub2 = c2.ExpectSubscription();
sub2.Request(3);
c2.ExpectNext(1, 2, 3);
c2.ExpectComplete();
}, Materializer);
}