We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4b4a5c commit a0f9270Copy full SHA for a0f9270
Open.ChannelExtensions.Tests/ExceptionTests.cs
@@ -38,6 +38,35 @@ await range
38
Assert.Equal(1, count);
39
}
40
41
+ [Fact]
42
+ public static async Task TransformExceptionPropagation()
43
+ {
44
+ int count = 0;
45
+ System.Collections.Generic.IEnumerable<int> range = Enumerable.Range(0, 1000);
46
+ try
47
48
+ await range
49
+ .ToChannel()
50
+ .Transform(i =>
51
52
+ if (i == 500)
53
54
+ Interlocked.Increment(ref count);
55
+ throw new TestException();
56
+ }
57
+
58
+ return i.ToString();
59
+ })
60
+ .ReadAll(_ => {});
61
62
+ catch (Exception ex)
63
64
+ Assert.IsType<TestException>(ex);
65
66
67
+ Assert.Equal(1, count);
68
69
70
[Fact]
71
public static async Task ExceptionPropagationConcurrent()
72
{
0 commit comments