From 28472911ef01f55c8eed3026001c193c6c16ac6a Mon Sep 17 00:00:00 2001 From: bflatastic Date: Wed, 18 Nov 2026 14:28:15 +0700 Subject: [PATCH] Tests: the slow Scripts read test checks past the threshold, not at it `(started + SLOW_SECS) - started` rounds below SLOW_SECS for about 1 in 40 start times, so a_slow_first_read_says_so_until_its_listing_comes failed at random on main. --- crates/ui-egui/src/tests/scripts_menu.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/tests/scripts_menu.rs b/crates/ui-egui/src/tests/scripts_menu.rs index 93f0117eb8..02c077e9af 100644 --- a/crates/ui-egui/src/tests/scripts_menu.rs +++ b/crates/ui-egui/src/tests/scripts_menu.rs @@ -520,7 +520,9 @@ fn a_slow_first_read_says_so_until_its_listing_comes() { scripts_menu::check_slow(started + scripts_menu::SLOW_SECS / 2.0); assert_eq!(shape(&scripts()), format!("({}), -, {FIXED}", scripts_menu::LOADING)); assert_eq!(scripts_menu::revision(), before); - scripts_menu::check_slow(started + scripts_menu::SLOW_SECS); + // Past the threshold rather than at it: `(started + SLOW_SECS) - started` can round below + // SLOW_SECS, which made this test fail for some start times. + scripts_menu::check_slow(started + 1.5 * scripts_menu::SLOW_SECS); assert_eq!(shape(&scripts()), format!("({}), -, {FIXED}", scripts_menu::SLOW)); assert_eq!(native_shape(&app), format!("({}), -, {FIXED}", scripts_menu::SLOW)); assert_eq!(scripts_menu::revision(), before + 1);