mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-03 11:10:23 +02:00
TestRouter_Ingested_InTxMark_FinalizeNone read two pieces of state produced by the media goroutine (r.mediaWg) without waiting for it: the resolve count, and the binding that only happens after resolve returns. Router.Handle does not wait for either, so on a loaded CI runner the assertions ran first and the test failed with "ingested message resolved media 0 times, want 1". Observed on a PR whose diff did not touch this package, and confirmed by re-running the identical commit green with no code change. Both assertions now use waitFor, matching what the sibling media assertions in this file already do — TestRouter_AppendErrorReleasesClaimAndAllowsMediaRetry wraps the same counter. The assertions themselves are unchanged. Co-authored-by: Bohan-J <bohan@devv.ai> Co-authored-by: multica-agent <github@multica.ai>