From bb71881afc049f11d2f4b2087c619d533d483b6f Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Thu, 7 Nov 2019 15:36:39 +1000 Subject: [PATCH] tests: Fix Network.Wai.Middleware.LoggingSpec on Windows --- lib/core/test/unit/Network/Wai/Middleware/LoggingSpec.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core/test/unit/Network/Wai/Middleware/LoggingSpec.hs b/lib/core/test/unit/Network/Wai/Middleware/LoggingSpec.hs index 3969456d72e..50e55c2e087 100644 --- a/lib/core/test/unit/Network/Wai/Middleware/LoggingSpec.hs +++ b/lib/core/test/unit/Network/Wai/Middleware/LoggingSpec.hs @@ -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 ] @@ -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) $