mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 09:13:34 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user