From deebe7dfe056576f3dd0745ae2385f5d1344ca27 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Fri, 3 Jul 2026 23:33:18 +0200 Subject: [PATCH] integration: fix flaky testTeamAdminCanReplaceMembers await timeout The test awaited async conversation.member-join notifications on the default timeOutSeconds budget (10s, or only 2s when .envrc sets TEST_TIMEOUT_SECONDS=2). The notification path is multi-hop and fully async (Galley -> pushNotifications -> gundeck -> cannon -> websocket), and returns *after* the HTTP replaceMembers call already answered 200. On a loaded CI runner the delivery can exceed that budget, yielding an empty AwaitResult (zero matches, zero non-matches) timeout. Bump the per-test await budget to 30s via 'local (setTimeoutTo 30)', matching the Test.LegalHold precedent. --- integration/test/Test/Channels.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration/test/Test/Channels.hs b/integration/test/Test/Channels.hs index 47f318bd750..f4b8a74e94a 100644 --- a/integration/test/Test/Channels.hs +++ b/integration/test/Test/Channels.hs @@ -24,6 +24,7 @@ import API.Common (randomName) import API.Galley import API.GalleyInternal hiding (getConversation, setTeamFeatureConfig) import qualified API.GalleyInternal as I +import Control.Monad.Reader (local) import GHC.Stack import MLS.Util import Notifications (isChannelAddPermissionUpdate, isMemberJoinNotif, isWelcomeNotif) @@ -526,8 +527,11 @@ testTeamAdminCanAddMembersWithoutJoining = do selfQid <- self %. "qualified_id" filterM (\m -> (/= selfQid) <$> (m %. "qualified_id")) allUsers +setTimeoutTo :: Int -> Env -> Env +setTimeoutTo tSecs env = env {timeOutSeconds = tSecs} + testTeamAdminCanReplaceMembers :: (HasCallStack) => App () -testTeamAdminCanReplaceMembers = do +testTeamAdminCanReplaceMembers = local (setTimeoutTo 30) do (alice, tid, bob : charlie : dylan : emil : fred : guenter : horst : ilona : _) <- createTeam OwnDomain 9 [bobId, charlieId, dylanId, emilId, fredId, guenterId, horstId, ilonaId] <- for [bob, charlie, dylan, emil, fred, guenter, horst, ilona] (%. "id")