Skip to content

Commit e8f58a2

Browse files
author
Shayne Fletcher
committed
[hyperactor]: mailbox: CanSend for Mailbox use mailbox port for returns- test
Differential Revision: [D77254558](https://our.internmc.facebook.com/intern/diff/D77254558/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D77254558/)! ghstack-source-id: 292441043 Pull Request resolved: #332
1 parent 5ce975a commit e8f58a2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

hyperactor_mesh/src/actor_mesh.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,19 @@ mod tests {
937937
ProcEvent::Stopped(0, ProcStopReason::Killed(0, false))
938938
);
939939

940+
// Try to send a message to 'ping'. Since 'ping's mailbox
941+
// is stopped, the send will timeout and fail.
942+
let (unmonitored_done_tx, _) = mesh.client().open_once_port();
943+
ping.send(
944+
mesh.client(),
945+
PingPongMessage(1, pong.clone(), unmonitored_done_tx.bind()),
946+
)
947+
.unwrap();
948+
949+
// The message will be returned!
950+
let Undeliverable(msg) = undeliverable_msg_rx.recv().await.unwrap();
951+
assert_eq!(msg.sender(), mesh.client().actor_id());
952+
940953
// Get 'pong' to send 'ping' a message. Since 'ping's
941954
// mailbox is stopped, the send will timeout and fail.
942955
let (unmonitored_done_tx, _) = mesh.client().open_once_port();

0 commit comments

Comments
 (0)