fix: flaky test (#15614)

This commit is contained in:
jif-oai authored and GitHub committed 2026-03-24 11:01:54 +00:00
1 parent f9545278e2
commit 567832c6fe
1 file changed
+8 -5
+8 -5
View File
@@ -965,7 +965,6 @@ async fn spawn_child_completion_notifies_parent_history() {
} }
#[tokio::test] #[tokio::test]
#[ignore = "flaky on: rust-ci / Tests — windows-arm64 - aarch64-pc-windows-msvc"]
async fn multi_agent_v2_completion_sends_inter_agent_message_to_direct_parent() { async fn multi_agent_v2_completion_sends_inter_agent_message_to_direct_parent() {
let harness = AgentControlHarness::new().await; let harness = AgentControlHarness::new().await;
let (root_thread_id, _) = harness.start_thread().await; let (root_thread_id, _) = harness.start_thread().await;
@@ -1022,6 +1021,13 @@ async fn multi_agent_v2_completion_sends_inter_agent_message_to_direct_parent()
) )
.await; .await;
let expected = InterAgentCommunication::new(
tester_path.clone(),
worker_path.clone(),
Vec::new(),
"done".to_string(),
);
timeout(MULTI_AGENT_EVENTUAL_TIMEOUT, async { timeout(MULTI_AGENT_EVENTUAL_TIMEOUT, async {
loop { loop {
let delivered = harness let delivered = harness
@@ -1033,10 +1039,7 @@ async fn multi_agent_v2_completion_sends_inter_agent_message_to_direct_parent()
&& matches!( && matches!(
op, op,
Op::InterAgentCommunication { communication } Op::InterAgentCommunication { communication }
if communication.author == tester_path if communication == expected
&& communication.recipient == worker_path
&& communication.other_recipients.is_empty()
&& communication.content == "done"
) )
}); });
if delivered { if delivered {