Fixing CI failed test due to wall-clock time limit in Docker VM.
Some checks failed
CI / linux (push) Failing after 5m17s
CI / windows-cross (push) Failing after 4m52s
CI / release (push) Has been skipped

This commit is contained in:
= 2026-08-04 18:20:17 -04:00
parent 2c03c0969d
commit dd09d38a4c
2 changed files with 25 additions and 5 deletions

View file

@ -57,6 +57,12 @@ jobs:
HOME: /root HOME: /root
# The highest libc6 version the .deb is allowed to require. # The highest libc6 version the .deb is allowed to require.
MAX_GLIBC: '2.35' MAX_GLIBC: '2.35'
# full_index.rs asserts a heavy indexing root cannot stall a light one, and
# measures that as wall-clock stall. The 100 ms default is calibrated on a
# developer machine; this runner measured 188 ms for the same correct
# behaviour. 600 ms keeps the check meaningful - the regression it exists to
# catch is ~6x the healthy figure, so it would land near 1.2 s here.
QSB_STALL_BUDGET_MS: '600'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -1326,14 +1326,28 @@ fn a_heavy_root_does_not_stall_a_light_one() {
// The fixed design's stall does not grow with the heavy root's cost — it is // The fixed design's stall does not grow with the heavy root's cost — it is
// one round-robin pass plus one commit — so making that root heavier only // one round-robin pass plus one commit — so making that root heavier only
// widens the margin. // widens the margin.
// The figures above are wall-clock, so they scale with the host: a small CI
// VM running the other tests in this binary alongside this one measures
// several times the developer-machine number without the design having
// changed at all. QSB_STALL_BUDGET_MS lets that environment say so out loud
// instead of the bound being quietly loosened for everyone. Keep any override
// well under the broken design's figure scaled by the same factor, or the
// test stops discriminating between the two.
let budget = Duration::from_millis(
std::env::var("QSB_STALL_BUDGET_MS")
.ok()
.and_then(|v| v.parse().ok())
.unwrap_or(100),
);
eprintln!( eprintln!(
"longest light-root stall while heavy extracted: {:?}", "longest light-root stall while heavy extracted: {:?} (budget {:?})",
worst worst, budget
); );
assert!( assert!(
worst < Duration::from_millis(100), worst < budget,
"the light root stalled for {:?} while the heavy root extracted", "the light root stalled for {:?} while the heavy root extracted (budget {:?})",
worst worst,
budget
); );
std::fs::remove_dir_all(&heavy).ok(); std::fs::remove_dir_all(&heavy).ok();