[control] Tests: a 15 s trial margin and waits on state, not fixed sleeps, for a loaded runner

This commit is contained in:
2026-12-02 16:47:58 +01:00
parent c626db8f25
commit f9e8ac801c
5 changed files with 37 additions and 30 deletions
+3 -3
View File
@@ -575,10 +575,10 @@ esac
let st = ce.env.wait_control_exit(Duration::from_secs(30));
eprintln!("QC control exit: {st:?}");
assert!(st.is_some());
// Longer than edge's trial deadline would allow.
tokio::time::sleep(Duration::from_secs(15)).await;
// Past the Caddy guard's deadline: watch 2 s + margin 15 s (common/mod.rs) + 5 s.
tokio::time::sleep(Duration::from_secs(27)).await;
let during = visit(&ce.env, ce.https, "b.test").await;
eprintln!("QC b.test through Caddy 15 s after the crash, control down: {during}");
eprintln!("QC b.test through Caddy 27 s after the crash, control down: {during}");
ce.env.start_control(None);
tokio::time::sleep(Duration::from_secs(3)).await;
let after = visit(&ce.env, ce.https, "b.test").await;