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 3c644cc commit c3e3846Copy full SHA for c3e3846
src/Tests/PolyfillTests_Task.cs
@@ -199,9 +199,9 @@ public async Task WaitAsync_TimeoutAndToken_CancellationBeforeTimeout_ThrowsTask
199
cancelSource.CancelAfter(100);
200
var task = Task.Delay(10000);
201
202
- // Act & Assert (cancellation should win)
203
- await Assert.That(async () =>
204
- await task.WaitAsync(TimeSpan.FromMilliseconds(500), cancelSource.Token)).Throws<TaskCanceledException>();
+ // Act & Assert (cancellation should win - use 5s timeout to ensure cancellation fires first on slow CI servers)
+ await Assert.ThrowsAsync<TaskCanceledException>(async () =>
+ await task.WaitAsync(TimeSpan.FromSeconds(5), cancelSource.Token));
205
}
206
207
[Test]
0 commit comments