Skip to content

Commit a22bc11

Browse files
committed
Use updated RegisterReply type in tests.
Port tests to use new RegisterReply type that provides information about ProcessId within it.
1 parent 0e0901b commit a22bc11

File tree

1 file changed

+8
-8
lines changed
  • src/Control/Distributed/Process/Tests

1 file changed

+8
-8
lines changed

src/Control/Distributed/Process/Tests/CH.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ testRemoteRegistry TestTransport{..} = do
660660
let nid1 = localNodeId node1
661661
registerRemoteAsync nid1 "ping" pingServer
662662
receiveWait [
663-
matchIf (\(RegisterReply label' _) -> "ping" == label')
664-
(\(RegisterReply _ _) -> return ()) ]
663+
matchIf (\(RegisterReply label' _ _) -> "ping" == label')
664+
(\(RegisterReply _ _ _) -> return ()) ]
665665

666666
Just pid <- whereisRemote nid1 "ping"
667667
True <- return $ pingServer == pid
@@ -738,8 +738,8 @@ testReconnect TestTransport{..} = do
738738
us <- getSelfPid
739739
registerRemoteAsync nid1 "a" us -- registerRemote is asynchronous
740740
receiveWait [
741-
matchIf (\(RegisterReply label' _) -> "a" == label')
742-
(\(RegisterReply _ _) -> return ()) ]
741+
matchIf (\(RegisterReply label' _ _) -> "a" == label')
742+
(\(RegisterReply _ _ _) -> return ()) ]
743743

744744
Just _ <- whereisRemote nid1 "a"
745745

@@ -750,14 +750,14 @@ testReconnect TestTransport{..} = do
750750
-- This will happen due to implicit reconnect
751751
registerRemoteAsync nid1 "b" us
752752
receiveWait [
753-
matchIf (\(RegisterReply label' _) -> "b" == label')
754-
(\(RegisterReply _ _) -> return ()) ]
753+
matchIf (\(RegisterReply label' _ _) -> "b" == label')
754+
(\(RegisterReply _ _ _) -> return ()) ]
755755

756756
-- Should happen
757757
registerRemoteAsync nid1 "c" us
758758
receiveWait [
759-
matchIf (\(RegisterReply label' _) -> "c" == label')
760-
(\(RegisterReply _ _) -> return ()) ]
759+
matchIf (\(RegisterReply label' _ _) -> "c" == label')
760+
(\(RegisterReply _ _ _) -> return ()) ]
761761

762762
-- Check
763763
Nothing <- whereisRemote nid1 "a" -- this will fail because the name is removed when the node is disconnected

0 commit comments

Comments
 (0)