Skip to content

Commit

Permalink
Fix hedging failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-csala committed Oct 1, 2024
1 parent 96986ab commit 06707c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ public async Task ExecuteAsync_EnsureBackgroundWorkInSuccessfulCallNotCancelled(
// assert
_timeProvider.Advance(TimeSpan.FromDays(2));

await backgroundTasks[0].Invoking(async t => await t).Should().ThrowAsync<TaskCanceledException>();
await Assert.ThrowsAsync<TaskCanceledException>(() => backgroundTasks[0]);

// background task is still pending
backgroundTasks[1].IsCompleted.Should().BeFalse();
Expand Down

0 comments on commit 06707c3

Please sign in to comment.