mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-30 20:45:52 +00:00
tests: fix sporadic failures from reading stats (#975)
This commit is contained in:
committed by
GitHub
parent
7a0cd8041b
commit
cb64dabf75
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user