public void TestLinkLeftToNull2() { var faultyContainer = new FaultyBlocks(); var involvedContainer = new InnocentBlocks(); faultyContainer.LinkLeftToNull(); faultyContainer.LinkSubTypeTo(involvedContainer); }
public void TestLinkLeftToNull2() { var faultyContainer = new FaultyBlocks(); var involvedContainer = new InnocentBlocks(); faultyContainer.LinkLeftToNull(); faultyContainer.TransformAndLink(involvedContainer); }
public async Task TestTermination() { var faultyContainer = new FaultyBlocks(); var involvedContainer = new InnocentBlocks(); faultyContainer.TransformAndLink(involvedContainer); faultyContainer.LinkLeftToNull(); faultyContainer.InputBlock.Post("test"); await EnsureTaskFail <SystemException>(faultyContainer.CompletionTask); await EnsureTaskFail <LinkedContainerFailedException>(involvedContainer.CompletionTask); }
public async Task TestTermination() { var faultyContainer = new FaultyBlocks(); var involvedContainer = new InnocentBlocks(); faultyContainer.LinkTo(involvedContainer); var cts = new CancellationTokenSource(); faultyContainer.RegisterCancellationTokenSource(cts); faultyContainer.InputBlock.Post("test"); var sleepingTask = Task.Delay(TimeSpan.FromDays(1), cts.Token); await EnsureTaskFail <SystemException>(faultyContainer.CompletionTask); await EnsureTaskFail <LinkedDataflowFailedException>(involvedContainer.CompletionTask); Assert.IsTrue(await sleepingTask.FinishesIn(TimeSpan.FromSeconds(1))); }