[GH-ISSUE #802] Flaky test: options_ui classic_graphics_presets_set_the_distances races the global menu style #230

Closed
opened 2026-11-02 15:37:30 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/802

🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself.

options_ui::tests::classic_graphics_presets_set_the_distances fails now and then in CI's verify job (#721 on 2026-10-17, #789 on 2026-10-18; both passed on rerun):

thread 'options_ui::tests::classic_graphics_presets_set_the_distances' panicked at crates/horizon-client/src/options_ui.rs:2755:13

Likely cause: other tests in the same module switch the process-wide menu style with set_style(...) and restore it at the end (for example the test just above, which ends with set_style(previous_style)). Cargo runs tests in parallel threads, so this test can lay out the Video page while another test has the style switched, and then the Preset slider isn't where it expects.

Fix options: serialize every test that reads or writes the style behind one shared static mutex, or pass the style explicitly to the layout in tests. Same family as #749.

Originally created by @ludovic111 on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/802 > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. `options_ui::tests::classic_graphics_presets_set_the_distances` fails now and then in CI's verify job (#721 on 2026-10-17, #789 on 2026-10-18; both passed on rerun): ``` thread 'options_ui::tests::classic_graphics_presets_set_the_distances' panicked at crates/horizon-client/src/options_ui.rs:2755:13 ``` Likely cause: other tests in the same module switch the process-wide menu style with `set_style(...)` and restore it at the end (for example the test just above, which ends with `set_style(previous_style)`). Cargo runs tests in parallel threads, so this test can lay out the Video page while another test has the style switched, and then the Preset slider isn't where it expects. Fix options: serialize every test that reads or writes the style behind one shared `static` mutex, or pass the style explicitly to the layout in tests. Same family as #749.
bsakaguchi 2026-11-02 15:37:30 +07:00
  • closed this issue
  • added the
    test
    label
Author
Owner

@LookImEcho-Rick commented on GitHub (Oct 18, 2026):

I can tackle this

<!-- gh-comment-id:6244641979 --> @LookImEcho-Rick commented on GitHub (Oct 18, 2026): I can tackle this
Author
Owner

@ludovic111 commented on GitHub (Oct 21, 2026):

🤖 Agent: @LookImEcho-Rick are you still on this one? There's no branch or PR for it yet. If you are, reply here and the agent will leave it to you. If not, the Q1 issue-batch agent will fix it later today (one shared mutex for every test that touches the menu style).

<!-- gh-comment-id:6326376217 --> @ludovic111 commented on GitHub (Oct 21, 2026): 🤖 Agent: @LookImEcho-Rick are you still on this one? There's no branch or PR for it yet. If you are, reply here and the agent will leave it to you. If not, the Q1 issue-batch agent will fix it later today (one shared mutex for every test that touches the menu style).
Author
Owner

@ludovic111 commented on GitHub (Oct 21, 2026):

🤖 Agent: no reply here, so the agent opened #1124 (under cfg(test) the menu style is per test thread; the options tests failed 4 of 200 runs on main, 0 of 200 with it). @LookImEcho-Rick, if you had your own fix in progress, say so on #1124 and the orchestrator will prefer yours.

<!-- gh-comment-id:6328817353 --> @ludovic111 commented on GitHub (Oct 21, 2026): 🤖 Agent: no reply here, so the agent opened #1124 (under cfg(test) the menu style is per test thread; the options tests failed 4 of 200 runs on main, 0 of 200 with it). @LookImEcho-Rick, if you had your own fix in progress, say so on #1124 and the orchestrator will prefer yours.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#230
No description provided.