From 0ed671b64324e27aa196d4e1e9cd58f176720e16 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 18 Mar 2025 15:29:56 +0100 Subject: [PATCH] contracts: fix flaky test --- tests/contracts/testMarket.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/contracts/testMarket.nim b/tests/contracts/testMarket.nim index 1d8095c7..0717e8fe 100644 --- a/tests/contracts/testMarket.nim +++ b/tests/contracts/testMarket.nim @@ -541,14 +541,14 @@ ethersuite "On-Chain Market": (await market.queryPastStorageRequestedEvents(blocksAgo = 2)) ) - test "pays rewards and collateral to host": + test "pays rewards and returns collateral to host": await market.requestStorage(request) let address = await host.getAddress() switchAccount(host) await market.reserveSlot(request.id, 0.uint64) await market.fillSlot(request.id, 0.uint64, proof, request.ask.collateralPerSlot) - let filledAt = (await ethProvider.currentTime()) + let filledAt = await ethProvider.blockTime(BlockTag.latest) for slotIndex in 1 ..< request.ask.slots: await market.reserveSlot(request.id, slotIndex.uint64) @@ -629,7 +629,7 @@ ethersuite "On-Chain Market": check collateral == request.ask.collateralPerSlot - (request.ask.collateralPerSlot * 10).div(100.u256) - test "the request is added in cache after the fist access": + test "the request is added to cache after the first access": await market.requestStorage(request) check market.requestCache.contains($request.id) == false