extensions icon indicating copy to clipboard operation
extensions copied to clipboard

FakeTimeProvider.Advance fails to advance delays (at least in the case of Polly)

Open rcollette opened this issue 1 year ago • 0 comments

Description

When using FakeTimerProvider in unit tests, retries configured in a ResiliencyPipeline are not executed.

The library maintainer believes the issue lies in FakeTimerProvider https://github.com/App-vNext/Polly/issues/1932

Reproduction Steps

Please see the minimal unit test repo https://github.com/rcollette/PollyRetryFakeTimeProviderIssue

Expected behavior

Delays used in Poly should be advanced.

Actual behavior

They don't appear to be triggered.

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8.0.101 Polly 8.2.1

Other information

I tried to debug down into the WakeWaiters/InvokeCallback/TimerCallback code but was not seeing why this was not triggering.

rcollette avatar Jan 27 '24 15:01 rcollette