From cb64dabf7504cdc6a240412f2f565efcd754f9c3 Mon Sep 17 00:00:00 2001 From: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:36:07 +0200 Subject: [PATCH] tests: fix sporadic failures from reading stats (#975) --- tests/SMPClient.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SMPClient.hs b/tests/SMPClient.hs index 32fb312a2..5bff0405c 100644 --- a/tests/SMPClient.hs +++ b/tests/SMPClient.hs @@ -130,7 +130,7 @@ serverBracket process afterProcess f = do E.bracket (forkIOWithUnmask ($ process started)) (\t -> killThread t >> afterProcess >> waitFor started "stop") - (\t -> waitFor started "start" >> f t) + (\t -> waitFor started "start" >> f t >>= \r -> r <$ threadDelay 100000) where waitFor started s = 5_000_000 `timeout` atomically (takeTMVar started) >>= \case