From 24392753607bbd63c333f021adfb626413aea78b Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Fri, 29 Nov 2024 15:46:24 +0100 Subject: [PATCH] Add 500ms threadDelay in test submitTx This is an unprincipled fix for the following macOS specific unit test failure: https://buildkite.com/cardano-foundation/cardano-wallet/builds/8283#019377d9-7963-4ff1-8c42-f270f8669a0c --- .../test/scenario/Test/Scenario/Blockchain.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/customer-deposit-wallet/test/scenario/Test/Scenario/Blockchain.hs b/lib/customer-deposit-wallet/test/scenario/Test/Scenario/Blockchain.hs index 9b77a8c4d96..821f04bbec4 100644 --- a/lib/customer-deposit-wallet/test/scenario/Test/Scenario/Blockchain.hs +++ b/lib/customer-deposit-wallet/test/scenario/Test/Scenario/Blockchain.hs @@ -1,4 +1,5 @@ {-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE RecordWildCards #-} {-| @@ -40,6 +41,9 @@ import Cardano.Wallet.Deposit.IO.Network.Type import Cardano.Wallet.Deposit.Pure ( BIP32Path ) +import Control.Concurrent + ( threadDelay + ) import Control.Tracer ( nullTracer ) @@ -135,4 +139,6 @@ signTx _ _ = id submitTx :: ScenarioEnv -> Write.Tx -> IO () submitTx env tx = do _ <- postTx (networkEnv env) tx - pure () + + -- Wait a short while to give the tx time to make it on-chain. + threadDelay 500_000