From 77c5d92ff943643a383bf126058a6dd2bb54082b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 26 May 2025 12:25:54 +0200 Subject: [PATCH] Reduce poll interval to detect sale cancelled state --- tests/integration/testmarketplace.nim | 32 ++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/integration/testmarketplace.nim b/tests/integration/testmarketplace.nim index e6118614..b2d44b3f 100644 --- a/tests/integration/testmarketplace.nim +++ b/tests/integration/testmarketplace.nim @@ -225,20 +225,20 @@ marketplacesuite "Marketplace payouts": NodeConfigs( # Uncomment to start Hardhat automatically, typically so logs can be inspected locally hardhat: HardhatConfig.none, - clients: CodexConfigs - .init(nodes = 1) - # .debug() # uncomment to enable console log output.debug() - .withLogFile() - # uncomment to output log file to tests/integration/logs/ //_.log - .withLogTopics("node", "erasure").some, - providers: CodexConfigs - .init(nodes = 1) - # .debug() # uncomment to enable console log output - .withLogFile() - # uncomment to output log file to tests/integration/logs/ //_.log - .withLogTopics( - "node", "marketplace", "sales", "reservations", "node", "statemachine" - ).some, + clients: CodexConfigs.init(nodes = 1) + # .debug() # uncomment to enable console log output.debug() + # .withLogFile() + # # uncomment to output log file to tests/integration/logs/ //_.log + # .withLogTopics("node", "erasure") + .some, + providers: CodexConfigs.init(nodes = 1) + # .debug() # uncomment to enable console log output + # .withLogFile() + # # uncomment to output log file to tests/integration/logs/ //_.log + # .withLogTopics( + # "node", "marketplace", "sales", "reservations", "node", "statemachine" + # ) + .some, ): let duration = 20.periods let expiry = 10.periods @@ -288,9 +288,11 @@ marketplacesuite "Marketplace payouts": # wait until sale is cancelled await ethProvider.advanceTime(expiry.u256) + check eventually( await providerApi.saleStateIs(slotId, "SaleCancelled"), - timeout = expiry.int * 1000, + timeout = 5 * 1000, + pollInterval = 200, ) await advanceToNextPeriod()