Verse call records: the in-flight test cannot hang when the first call is refused

Two reserve mutants timed out because the test spun waiting for a call a
mutant had refused. The wait is now bounded and fails. Builds: yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-10 15:39:15 +02:00
commit 2e9905f42f

View file

@ -327,9 +327,13 @@ async fn calls_on_the_wire_hold_their_bound() {
let port = port.clone();
tokio::spawn(async move { port.infer(prepared_for("held", 1_200)).await })
};
while inner.calls() == 0 {
tokio::task::yield_now().await;
}
tokio::time::timeout(std::time::Duration::from_secs(5), async {
while inner.calls() == 0 {
tokio::task::yield_now().await;
}
})
.await
.expect("the first call reached the provider");
// A second call that was let through would wait on the closed gate.
let second = tokio::time::timeout(
std::time::Duration::from_secs(5),