Skip to content

Commit

Permalink
Increase delay for spectest from 100ms to 2 seconds.
Browse files Browse the repository at this point in the history
This is likely way too much (1 second should be enough for anyone), but
adding another second makes it that much less likely to fail, saving
about 8 minutes every time it saves a failure.
  • Loading branch information
iphydf committed Jun 5, 2017
1 parent b5c0694 commit 7a416de
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/tox-spectest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ withSut "" action = action
withSut sut action = do
-- Start a SUT (System Under Test) process that will listen on port 1234.
(_, _, _, sutProc) <- createProcess $ proc sut []
-- 100ms delay to give the SUT time to set up its socket before we try to
-- build connections in the test runner.
threadDelay $ 100 * 1000
-- 2 seconds delay to give the SUT time to set up its socket before we try
-- to build connections in the test runner. This is high, because on Travis,
-- the SUT can take quite some time to become ready to accept connections.
-- Ideally, we would probe the SUT every 100ms or so until it starts
-- accepting RPCs, but that's something we should consider putting into the
-- RPC library itself.
threadDelay $ 2 * 1000 * 1000
action
terminateProcess sutProc

Expand Down

0 comments on commit 7a416de

Please sign in to comment.