Repository navigation
Check the maximum operation count in HeartbeatConsistencyCheckPingsAsync - #3342
Conversation
|
Thanks @unsafePtr — nice catch. The typo dates all the way back to #2656, so the upper bound (and the false case's exact-zero) had been silently vacuous for three years; the compound assert testing One thing we'll keep an eye on post-merge: since those bounds have never actually gated a run, this effectively arms two new timing assertions (the 100ms heartbeat fires on wall clock, so a |
|
@mgravell , that's the beauty of roslyn analyzer. Let me try to scan couple more projects. If you have also something in mind for catching such kind of mistakes, please let me know. I would be happy to improve the analyzer. |
HeartbeatConsistencyCheckPingsAsyncassertedminExpected <= opCount && opCount >= minExpected, checking the minimum twice and never themaxExpectedfrom the theory data. It now checksopCount <= maxExpected, so the case with consistency checks disabled verifies that no heartbeat operations are sent.Both theory cases pass on net8.0 and net10.0 against a local Redis 7, three runs in a row.
Checklist