Skip to content

Commit dcbda5a

Browse files
committed
fix more nGet/UP
1 parent c76d167 commit dcbda5a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

tests/AgentTests/FunctionalAPITests.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module AgentTests.FunctionalAPITests
3939
rfGet,
4040
sfGet,
4141
nGet,
42+
nGetUP,
4243
(##>),
4344
(=##>),
4445
pattern CON,

tests/AgentTests/NotificationTests.hs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import AgentTests.FunctionalAPITests
1919
joinConnection,
2020
makeConnection,
2121
nGet,
22+
nGetUP,
2223
runRight,
2324
runRight_,
2425
sendMessage,
@@ -594,8 +595,8 @@ testNotificationsSMPRestart t APNSMockServer {apnsQ} = withAgentClients2 $ \alic
594595
nGet bob =##> \case ("", "", DOWN _ [c]) -> c == aliceId; _ -> False
595596

596597
withSmpServerStoreLogOn t testPort $ \threadId -> runRight_ $ do
597-
nGet alice =##> \case ("", "", UP _ [c]) -> c == bobId; _ -> False
598-
nGet bob =##> \case ("", "", UP _ [c]) -> c == aliceId; _ -> False
598+
nGetUP alice =##> \case ("", "", UP _ [c]) -> c == bobId; _ -> False
599+
nGetUP bob =##> \case ("", "", UP _ [c]) -> c == aliceId; _ -> False
599600
liftIO $ threadDelay 1000000
600601
5 <- sendMessage bob aliceId (SMP.MsgFlags True) "hello again"
601602
get bob ##> ("", aliceId, SENT 5)
@@ -628,11 +629,11 @@ testNotificationsSMPRestartBatch n t APNSMockServer {apnsQ} =
628629
liftIO $ length (acs1 <> acs2) `shouldBe` length conns
629630

630631
runServers $ do
631-
("", "", UP _ bcs1) <- nGet a
632-
("", "", UP _ bcs2) <- nGet a
632+
("", "", UP _ bcs1) <- nGetUP a
633+
("", "", UP _ bcs2) <- nGetUP a
633634
liftIO $ length (bcs1 <> bcs2) `shouldBe` length conns
634-
("", "", UP _ acs1) <- nGet b
635-
("", "", UP _ acs2) <- nGet b
635+
("", "", UP _ acs1) <- nGetUP b
636+
("", "", UP _ acs2) <- nGetUP b
636637
liftIO $ length (acs1 <> acs2) `shouldBe` length conns
637638
liftIO $ threadDelay 1500000
638639
forM_ conns $ \(aliceId, bobId) -> do

tests/SMPProxyTests.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ agentViaProxyRetryOffline = do
348348
withServer2 = withServer_ testStoreLogFile2 testStoreMsgsFile2 testPort2
349349
withServer_ storeLog storeMsgs port =
350350
withSmpServerConfigOn (transport @TLS) proxyCfg {storeLogFile = Just storeLog, storeMsgsFile = Just storeMsgs} port
351-
a `up` cId = nGet a =##> \case ("", "", UP _ [c]) -> c == cId; _ -> False
351+
a `up` cId = nGetUP a =##> \case ("", "", UP _ [c]) -> c == cId; _ -> False
352352
a `down` cId = nGet a =##> \case ("", "", DOWN _ [c]) -> c == cId; _ -> False
353353
aCfg = agentProxyCfg {messageRetryInterval = fastMessageRetryInterval}
354354
baseId = 3

0 commit comments

Comments
 (0)