Skip to content

Commit 9bce756

Browse files
sim::test_actor_mesh_cast: try to avoid intermittent fatal (#792)
Summary: Pull Request resolved: #792 every now and then, running the `hyperactor_mesh` test-suite one encounters, ``` ⚠ Fatal: monarch/hyperactor_mesh:hyperactor_mesh-unittest - actor_mesh::tests::sim::test_actor_mesh_cast (2.5s) Test appears to have passed but the binary exited with a non-zero exit code. ``` on pzhan9's advice, we explicitly shutdown the mesh in the named test hoping to avoid it in future. ghstack-source-id: 301434025 exported-using-ghexport Reviewed By: pablorfb-meta Differential Revision: D79818036 fbshipit-source-id: 39ede644232c36f63c5316b0dedf936780ca8ce2
1 parent 7a77021 commit 9bce756

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hyperactor_mesh/src/actor_mesh.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ mod tests {
926926
.await
927927
.unwrap();
928928

929-
let proc_mesh = ProcMesh::allocate(alloc).await.unwrap();
929+
let mut proc_mesh = ProcMesh::allocate(alloc).await.unwrap();
930930

931931
let (tx, mut rx) = hyperactor::mailbox::open_port(proc_mesh.client());
932932
let params = CastTestActorParams{ forward_port: tx.bind() };
@@ -937,6 +937,12 @@ mod tests {
937937
for _ in 0..num_actors {
938938
assert_eq!(rx.recv().await.unwrap(), CastTestMessage::Forward("abc".to_string()));
939939
}
940+
941+
// Attempt to avoid this intermittent fatal error.
942+
// ⚠ Fatal: monarch/hyperactor_mesh:hyperactor_mesh-unittest - \
943+
// actor_mesh::tests::sim::test_actor_mesh_cast (2.5s)
944+
// Test appears to have passed but the binary exited with a non-zero exit code.
945+
proc_mesh.events().unwrap().into_alloc().stop_and_wait().await.unwrap();
940946
}
941947

942948
#[tokio::test]

0 commit comments

Comments
 (0)