From 539d73bc3652a1fdfb0c40b54ce6bee9b389b7f2 Mon Sep 17 00:00:00 2001 From: acamilo Date: Wed, 30 Sep 2026 20:57:27 +0000 Subject: [PATCH] tests: the shadow test waits for the verdict status to settle before asserting it The compared count and the status are recomputed on different verdict writes; on a loaded box the v0.7.1 release gate read the new count with the status still 'running'. Bounded wait (120 s); assertions unchanged. --- .../flysim/crates/fly-legacy-session/tests/shadow.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/flysim/crates/fly-legacy-session/tests/shadow.rs b/services/flysim/crates/fly-legacy-session/tests/shadow.rs index 7378a15..291b2b4 100644 --- a/services/flysim/crates/fly-legacy-session/tests/shadow.rs +++ b/services/flysim/crates/fly-legacy-session/tests/shadow.rs @@ -395,7 +395,17 @@ fn the_shadow_follows_the_real_service_and_catches_every_planted_difference() { ); std::thread::sleep(Duration::from_millis(200)); } - let passed = verdict_of(&out); + // The compared count and the status are recomputed on different verdict writes: a loaded box + // read the new count with the status still `running` (the v0.7.1 release gate). Wait, bounded, + // for the status to settle before asserting it. + let settle_by = Instant::now() + Duration::from_secs(120); + let passed = loop { + let v = verdict_of(&out); + if v["status"] != "running" || handle.is_finished() || Instant::now() >= settle_by { + break v; + } + std::thread::sleep(Duration::from_millis(200)); + }; eprintln!( "shadow after both processes: {}", serde_json::to_string_pretty(&passed).unwrap()