From 9a2f1e5eb795e3b31562170a05c15a611a369726 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 4 Nov 2026 05:23:14 -0800 Subject: [PATCH] Tests: the Render Threads restart test stays within the preference's range VECTORCRAFT_RENDER_THREADS can make default_threads() return more than 64, the largest value prefs.set accepts for renderThreads. The test now caps the value at 64, so it passes with the variable set to 100. --- crates/ui-egui/src/prefs_dialog/tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/prefs_dialog/tests.rs b/crates/ui-egui/src/prefs_dialog/tests.rs index cbc429b5f..02789d35a 100644 --- a/crates/ui-egui/src/prefs_dialog/tests.rs +++ b/crates/ui-egui/src/prefs_dialog/tests.rs @@ -88,7 +88,8 @@ fn reapply_restarts_the_renderer_after_a_render_threads_change() { apply_runtime(&mut app, &ctx); app.canvas.worker_started = true; // The automatic count as an explicit value: the process-wide count other tests read stays the same. - let threads = vectorcraft_render::default_threads(); + // `VECTORCRAFT_RENDER_THREADS` can give more than the 64 the preference accepts. + let threads = vectorcraft_render::default_threads().min(64); app.run("prefs.set", json!({"key": "renderThreads", "value": threads})).unwrap(); reapply(&mut app, &ctx); let restarted = !app.canvas.worker_started;