File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -937,6 +937,19 @@ mod tests {
937
937
ProcEvent :: Stopped ( 0 , ProcStopReason :: Killed ( 0 , false ) )
938
938
) ;
939
939
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
+
940
953
// Get 'pong' to send 'ping' a message. Since 'ping's
941
954
// mailbox is stopped, the send will timeout and fail.
942
955
let ( unmonitored_done_tx, _) = mesh. client ( ) . open_once_port ( ) ;
You can’t perform that action at this time.
0 commit comments