@@ -22,7 +22,7 @@ import Testnet.Components.Configuration
2222import Testnet.Components.Query
2323import Testnet.Defaults
2424import Testnet.Process.Run (execCli' , mkExecConfig )
25- import Testnet.Property.Util (integrationWorkspace )
25+ import Testnet.Property.Util (integrationRetryWorkspace )
2626import Testnet.Types
2727
2828import Hedgehog (Property )
@@ -31,7 +31,7 @@ import qualified Hedgehog.Extras as H
3131
3232-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/Collateral With Multiassets/"'@
3333hprop_collateral_with_tokens :: Property
34- hprop_collateral_with_tokens = integrationWorkspace " collateral-with-tokens" $ \ tempAbsBasePath' -> H. runWithDefaultWatchdog_ $ do
34+ hprop_collateral_with_tokens = integrationRetryWorkspace 2 " collateral-with-tokens" $ \ tempAbsBasePath' -> H. runWithDefaultWatchdog_ $ do
3535 conf@ Conf { tempAbsPath } <- mkConf tempAbsBasePath'
3636 let tempAbsPath' = unTmpAbsPath tempAbsPath
3737 work <- H. createDirectoryIfMissing $ tempAbsPath' </> " work"
@@ -145,13 +145,9 @@ hprop_collateral_with_tokens = integrationWorkspace "collateral-with-tokens" $ \
145145 -- STEP 2: Attempt to spend from script with collateral containing tokens
146146 -- This will fail because collateral cannot contain non-ADA tokens
147147
148- -- Wait for transactions to be processed and find UTxOs
149- _ <- waitForBlocks epochStateView 1
150-
151- -- Find the UTxO with tokens at wallet1 (for collateral)
152- txinCollateralWithTokensM <-
148+ -- Find the UTxO with tokens at wallet2 (for collateral)
149+ (txinCollateralWithTokens, collateralTxOut) <- retryUntilJustM epochStateView (WaitForBlocks 10 ) $
153150 findLargestMultiAssetUtxoWithAddress epochStateView sbe $ T. pack maCollateralAddress
154- (txinCollateralWithTokens, collateralTxOut) <- H. evalMaybe txinCollateralWithTokensM
155151 H. note_ " Collateral TxOut"
156152 H. noteShow_ collateralTxOut
157153 -- Find the UTxO at the script address
0 commit comments