fix timing issue in validation unit test

This commit is contained in:
Mark Spanbroek 2024-11-12 10:50:38 +01:00
parent eb74a6dfb5
commit a5ec80b99f
No known key found for this signature in database
GPG Key ID: FBE3E9548D427C00
1 changed files with 5 additions and 5 deletions

View File

@ -128,14 +128,14 @@ asyncchecksuite "validation":
await market.fillSlot(slot.request.id, slot.slotIndex, proof, collateral)
market.setCanProofBeMarkedAsMissing(slot.id, true)
advanceToNextPeriod()
await sleepAsync(1.millis)
await sleepAsync(100.millis) # allow validation loop to run
check market.markedAsMissingProofs.contains(slot.id)
test "when a proof can not be marked as missing, it will not be marked":
await market.fillSlot(slot.request.id, slot.slotIndex, proof, collateral)
market.setCanProofBeMarkedAsMissing(slot.id, false)
advanceToNextPeriod()
await sleepAsync(1.millis)
await sleepAsync(100.millis) # allow validation loop to run
check market.markedAsMissingProofs.len == 0
test "it does not monitor more than the maximum number of slots":