Skip to content

Commit

Permalink
integration: Disable failureContext for failing test, add FUTUREWORK.
Browse files Browse the repository at this point in the history
  • Loading branch information
elland committed Nov 7, 2024
1 parent 68643a0 commit 73ea202
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions integration/test/Test/Events.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Testlib.Prelude hiding (assertNoEvent)
import Testlib.Printing
import UnliftIO hiding (handle)

-- FUTUREWORK: Investigate why these tests are failing without
-- `withModifiedBackend`; No events are received otherwise.
testConsumeEventsOneWebSocket :: (HasCallStack) => App ()
testConsumeEventsOneWebSocket = do
withModifiedBackend def \domain -> do
Expand Down Expand Up @@ -59,17 +61,16 @@ testConsumeEventsOneWebSocket = do

testConsumeEventsForDifferentUsers :: (HasCallStack) => App ()
testConsumeEventsForDifferentUsers = do
alice <- randomUser OwnDomain def
bob <- randomUser OwnDomain def
withModifiedBackend def $ \domain -> do
alice <- randomUser domain def
bob <- randomUser domain def

aliceClient <- addClient alice def {acapabilities = Just ["consumable-notifications"]} >>= getJSON 201
aliceClientId <- objId aliceClient
aliceClient <- addClient alice def {acapabilities = Just ["consumable-notifications"]} >>= getJSON 201
aliceClientId <- objId aliceClient

bobClient <- addClient bob def {acapabilities = Just ["consumable-notifications"]} >>= getJSON 201
bobClientId <- objId bobClient
bobClient <- addClient bob def {acapabilities = Just ["consumable-notifications"]} >>= getJSON 201
bobClientId <- objId bobClient

userIdsContext <- mkContextUserIds [("alice", alice), ("bob", bob)]
addFailureContext userIdsContext $ do
withEventsWebSockets [(alice, aliceClientId), (bob, bobClientId)] $ \[(aliceEventsChan, aliceAckChan), (bobEventsChan, bobAckChan)] -> do
assertClientAdd aliceClientId aliceEventsChan aliceAckChan
assertClientAdd bobClientId bobEventsChan bobAckChan
Expand Down

0 comments on commit 73ea202

Please sign in to comment.