contracts: fix flaky test

This commit is contained in:
Mark Spanbroek 2025-03-18 15:29:56 +01:00
parent d6f7fb325c
commit 0ed671b643
No known key found for this signature in database
GPG Key ID: FBE3E9548D427C00

View File

@ -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