Skip to content

Commit

Permalink
Wait for the deadline to pass in cluster recover tests
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Oct 15, 2024
1 parent d42c6e9 commit 362f9cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,8 @@ canRecoverDeposit tracer workDir node hydraScriptsTxId =
`shouldReturn` 0

let path = BSC.unpack $ urlEncode False $ encodeUtf8 $ T.pack $ show (getTxId $ getTxBody tx)

threadDelay $ fromIntegral deadline
-- NOTE: we need to wait for the deadline to pass before we can recover the deposit
threadDelay $ fromIntegral (deadline * 2)

recoverResp <-
parseUrlThrow ("DELETE " <> hydraNodeBaseUrl n1 <> "/commits/" <> path)
Expand Down Expand Up @@ -885,7 +885,8 @@ canSeePendingDeposits tracer workDir node hydraScriptsTxId =

forM_ deposited $ \deposit -> do
let path = BSC.unpack $ urlEncode False $ encodeUtf8 $ T.pack $ show deposit
threadDelay $ fromIntegral deadline
-- NOTE: we need to wait for the deadline to pass before we can recover the deposit
threadDelay $ fromIntegral (deadline * 2)
recoverResp <-
parseUrlThrow ("DELETE " <> hydraNodeBaseUrl n1 <> "/commits/" <> path)
>>= httpJSON
Expand Down

0 comments on commit 362f9cd

Please sign in to comment.