Skip to content

Commit

Permalink
tests: Fix Network.Wai.Middleware.LoggingSpec on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed Nov 7, 2019
1 parent b74a169 commit bb71881
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/core/test/unit/Network/Wai/Middleware/LoggingSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ spec = describe "Logging Middleware"
, replicate (n - i) (get ctx "/get")
]
void $ mapConcurrently id reqs
threadDelay 1000000 -- let iohk-monitoring flush the logs
entries <- readTVarIO (logs ctx)
let index = Map.fromList
$ catMaybes [ (loName l,) <$> captureTime l | l <- entries ]
Expand Down Expand Up @@ -267,6 +268,8 @@ postIlled ctx path body = do

expectLogs :: Context -> [(Severity, String)] -> IO ()
expectLogs ctx expectations = do
threadDelay 1000000 -- let iohk-monitoring flush the logs

entries <- reverse <$> readTVarIO (logs ctx)

when (length entries /= length expectations) $
Expand Down

0 comments on commit bb71881

Please sign in to comment.