Merge pull request #1251 from getagentseal/fix/xproc-test-contention-budget

test(windows): stop the cross-process test starving itself on a loaded runner
This commit is contained in:
Resham Joshi 2026-09-03 13:03:59 -07:00 • committed by GitHub
commit 01e5a7663a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2052,7 +2052,13 @@ mod tests {
// A key neither side writes, to prove the merge preserves it through all the churn.
fs::write(&dock_file, "{\"other\":\"keep\"}").unwrap();
let iters: u32 = 100;
// 100 rounds a side, both taking the lock, while a reader thread hammers the same
// file. The production wait budget is 2s with a 50ms poll, which is right for a UI
// that writes on a click but starves under this much contention: a waiter that keeps
// losing the race after each poll can exceed 2s on a loaded runner, which is what
// reddened main rather than any lost update. Fewer rounds keep the property under
// test and stop the harness from being the thing that fails.
let iters: u32 = 24;
let nolock = std::env::var("CB_TRAY_XPROC_NOLOCK").ok().as_deref() == Some("1");
let mut child = match Command::new("node")