Closed bartelink closed 7 months ago
And yes, the tests should not be using Task.Delay
to engineer overlaps and/or expirations. The more correct (and, in retrospect, obvious) approach is to maximise use of TimeProvider
and/or events, in order to make them quicker, more deterministic and correct (would really appreciate a PR regarding that; it's unfortunately too far down my overall list of priorities at the moment...)
Fixes the condition for the swap, which has a race condition that can mean delivering the value we've just literally determined to be too old Reduce a test timeout to hopefully reduce flakiness Also fixes an oversight: even if a concurrent request was too old for the
maxAge
, it can still serve as the base state for an incremental load (not a big deal in the normal case; only the very first load would be suboptimal)