Skip to content

Commit 3ef7ce2

Browse files
authored
galley-integration: Wait for starting legalhold test device (#3755)
1 parent 541b77b commit 3ef7ce2

File tree

1 file changed

+3
-1
lines changed
  • services/galley/test/integration/API/Teams/LegalHold

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,15 @@ withTestService ::
194194
TestM a
195195
withTestService mkApp go = withFreePortAnyAddr $ \(sPort, sock) -> do
196196
config <- view (tsIConf . to provider)
197+
serverStarted <- newEmptyMVar
197198
let tlss = Warp.tlsSettings (cert config) (privateKey config)
198-
let defs = Warp.defaultSettings {Warp.settingsPort = sPort}
199+
let defs = Warp.defaultSettings {Warp.settingsPort = sPort, Warp.settingsBeforeMainLoop = putMVar serverStarted ()}
199200
buf <- liftIO newChan
200201
srv <-
201202
liftIO . Async.async $
202203
Warp.runTLSSocket tlss defs sock $
203204
mkApp buf
205+
takeMVar serverStarted
204206
go sPort buf `finally` liftIO (Async.cancel srv)
205207

206208
publicKeyNotMatchingService :: PEM

0 commit comments

Comments
 (0)