mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-28 12:36:47 -06:00
Parallel test runs could flake: theme::LIGHT_THEME is process-wide, and the edit_window harness tests ran whole frames without holding lock_test_palette(), so a theme test could flip the palette between a harness test painting rows and looking them up by colour (and a harness frame could reset it to dark mid-theme-test). Make the test palette lock re-entrant per thread and take it inside SoundApp::new (test builds only), so every test that builds an app owns the palette for the app's whole lifetime. Adds a regression test that the lock is re-entrant on the owning thread and excludes others. Fixes #323