Skip to content

Commit

Permalink
Delay retry on a non-acceptable status code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbiehl committed Jul 25, 2023
1 parent 9aefe04 commit ea5d27b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TestContainers/Docker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,8 @@ waitForHttp port path acceptableStatusCodes = WaitReady $ \container -> do
withTrace
configTracer
(TraceHttpCall endpointHost endpointPort (Right code))
unless (code `elem` acceptableStatusCodes) $
unless (code `elem` acceptableStatusCodes) $ do
liftIO (threadDelay 500000)
retry manager
Left (exception :: HttpException) -> do
withTrace
Expand Down

0 comments on commit ea5d27b

Please sign in to comment.