From 362f9cd931e147472c0c9f52d97af6228ae69a58 Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Tue, 15 Oct 2024 14:15:21 +0200 Subject: [PATCH] Wait for the deadline to pass in cluster recover tests --- hydra-cluster/src/Hydra/Cluster/Scenarios.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hydra-cluster/src/Hydra/Cluster/Scenarios.hs b/hydra-cluster/src/Hydra/Cluster/Scenarios.hs index 626125db518..753ddcdf531 100644 --- a/hydra-cluster/src/Hydra/Cluster/Scenarios.hs +++ b/hydra-cluster/src/Hydra/Cluster/Scenarios.hs @@ -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) @@ -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