Re: Unit tests for trading code: boring and invaluable
Posted: Thu Oct 29, 2026 7:14 pm
The Half-Open State
When the 15-minute BreakDuration expires, Polly transitions into a Half-Open state. It allows exactly one execution through the pipeline as a probe.
If that probe succeeds, the circuit fully closes, the failure counters reset, and normal high-frequency execution resumes.
If that probe fails, the circuit instantly trips back to Open, and another full 15-minute cooldown begins.
When the 15-minute BreakDuration expires, Polly transitions into a Half-Open state. It allows exactly one execution through the pipeline as a probe.
If that probe succeeds, the circuit fully closes, the failure counters reset, and normal high-frequency execution resumes.
If that probe fails, the circuit instantly trips back to Open, and another full 15-minute cooldown begins.