Skip to content

Commit 15ffb8f

Browse files
update test assertion
1 parent 3542ce0 commit 15ffb8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Threading.Tasks/tests/Task/AsyncEnumerableToBlockingEnumerableTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public static void AsyncEnumerableWithCancellation()
139139
using var cts = new CancellationTokenSource(millisecondsDelay: 1000);
140140
IEnumerable<string> blockingEnumerable = source.ToBlockingEnumerable(cts.Token);
141141

142-
Assert.Throws<OperationCanceledException>(() => blockingEnumerable.Count());
142+
Assert.Throws<TaskCanceledException>(() => blockingEnumerable.Count());
143143

144144
Assert.Equal(1, source.TotalGetAsyncEnumeratorCalls);
145145
Assert.Equal(1, source.TotalDisposeAsyncCalls);

0 commit comments

Comments
 (0)