Files
Martin-Molinero dbb126a5d2 Fix random LeanOptimizerTests failures from concurrent Config access (#9554)
LeanOptimizerTests runs Parallelizable(ParallelScope.Children). The LeanOptimizer
constructor reads 'optimization-update-interval' from the shared global Config,
while TrackEstimation writes it via Config.Set. The underlying config store is
not thread-safe, so a write racing a concurrent read could corrupt its internal
state and throw (e.g. ArgumentOutOfRangeException), failing random tests in the
fixture.

Serialize the construction-time config reads against that write with a fixture
lock: construct the optimizer through a CreateOptimizer helper that takes the
lock, and take the same lock around the Config.Set call.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 11:42:05 -03:00
..
2024-06-26 10:11:36 -03:00
2024-07-10 14:08:28 -03:00