Skip to content

Commit b803260

Browse files
committed
Adjust tests: Assert transient events
1 parent 4c29b68 commit b803260

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

services/galley/test/integration/API/Teams.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,6 @@ testUpdateTeamMember = do
14631463
. json change
14641464
)
14651465
checkTeamMemberUpdateEvent tid uid w mPerm = WS.assertMatch_ timeout w $ \notif -> do
1466-
ntfTransient notif @?= False
14671466
let e = List1.head (WS.unpackPayload notif)
14681467
e ^. eventTeam @?= tid
14691468
e ^. eventData @?= EdMemberUpdate uid mPerm
@@ -1768,7 +1767,7 @@ putSearchVisibility g uid tid vis = do
17681767

17691768
checkJoinEvent :: (MonadIO m, MonadCatch m) => TeamId -> UserId -> WS.WebSocket -> m ()
17701769
checkJoinEvent tid usr w = WS.assertMatch_ timeout w $ \notif -> do
1771-
ntfTransient notif @?= False
1770+
ntfTransient notif @?= True
17721771
let e = List1.head (WS.unpackPayload notif)
17731772
e ^. eventTeam @?= tid
17741773
e ^. eventData @?= EdMemberJoin usr

services/galley/test/integration/API/Util.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,21 +2716,21 @@ checkUserDeleteEvent uid timeout_ w = WS.assertMatch_ timeout_ w $ \notif -> do
27162716

27172717
checkTeamMemberJoin :: HasCallStack => TeamId -> UserId -> WS.WebSocket -> TestM ()
27182718
checkTeamMemberJoin tid uid w = WS.awaitMatch_ checkTimeout w $ \notif -> do
2719-
ntfTransient notif @?= False
2719+
ntfTransient notif @?= True
27202720
let e = List1.head (WS.unpackPayload notif)
27212721
e ^. eventTeam @?= tid
27222722
e ^. eventData @?= EdMemberJoin uid
27232723

27242724
checkTeamMemberLeave :: HasCallStack => TeamId -> UserId -> WS.WebSocket -> TestM ()
27252725
checkTeamMemberLeave tid usr w = WS.assertMatch_ checkTimeout w $ \notif -> do
2726-
ntfTransient notif @?= False
2726+
ntfTransient notif @?= True
27272727
let e = List1.head (WS.unpackPayload notif)
27282728
e ^. eventTeam @?= tid
27292729
e ^. eventData @?= EdMemberLeave usr
27302730

27312731
checkTeamUpdateEvent :: (HasCallStack, MonadIO m, MonadCatch m) => TeamId -> TeamUpdateData -> WS.WebSocket -> m ()
27322732
checkTeamUpdateEvent tid upd w = WS.assertMatch_ checkTimeout w $ \notif -> do
2733-
ntfTransient notif @?= False
2733+
ntfTransient notif @?= True
27342734
let e = List1.head (WS.unpackPayload notif)
27352735
e ^. eventTeam @?= tid
27362736
e ^. eventData @?= EdTeamUpdate upd

0 commit comments

Comments
 (0)