Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion services/brig/test/integration/API/Federation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import Data.Timeout
import qualified Data.UUID.V4 as UUIDv4
import Federation.Util (generateClientPrekeys)
import Imports
import qualified Network.Wai.Test as WaiTest
import Test.QuickCheck hiding ((===))
import Test.Tasty
import qualified Test.Tasty.Cannon as WS
Expand Down Expand Up @@ -196,7 +197,8 @@ testSearchRestrictions opts brig = do
Opt.FederationDomainConfig domainFullSearch FullSearch
]

let expectSearch domain squery expectedUsers expectedSearchPolicy = do
let expectSearch :: HasCallStack => Domain -> Text -> [Qualified UserId] -> FederatedUserSearchPolicy -> WaiTest.Session ()
expectSearch domain squery expectedUsers expectedSearchPolicy = do
searchResponse <-
runWaiTestFedClient domain $
createWaiTestFedClient @"search-users" @'Brig (SearchRequest squery)
Expand Down
4 changes: 2 additions & 2 deletions services/brig/test/integration/API/MLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ testKeyPackageZeroCount brig = do
testKeyPackageExpired :: Brig -> Http ()
testKeyPackageExpired brig = do
u <- userQualifiedId <$> randomUser brig
let lifetime = 2 # Second
let lifetime = 3 # Second
[c1, c2] <- for [(0, Just lifetime), (1, Nothing)] $ \(i, lt) -> do
c <- createClient brig u i
-- upload 1 key package for each client
Expand All @@ -95,7 +95,7 @@ testKeyPackageExpired brig = do
count <- getKeyPackageCount brig u cid
liftIO $ count @?= expectedCount
-- wait for c1's key package to expire
threadDelay (fromIntegral ((lifetime + 3 # Second) #> MicroSecond))
threadDelay (fromIntegral ((lifetime + 4 # Second) #> MicroSecond))

-- c1's key package has expired by now
for_ [(c1, 0), (c2, 1)] $ \(cid, expectedCount) -> do
Expand Down
2 changes: 1 addition & 1 deletion services/galley/test/integration/API/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ checkConvMemberLeaveEvent cid usr w = WS.assertMatch_ checkTimeout w $ \notif ->
other -> assertFailure $ "Unexpected event data: " <> show other

checkTimeout :: WS.Timeout
checkTimeout = 3 # Second
checkTimeout = 4 # Second

-- | The function is used in conjuction with 'withTempMockFederator' to mock
-- responses by Brig on the mocked side of federation.
Expand Down