mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-01-13 16:15:23 +00:00
fix timing issue in validation unit test
This commit is contained in:
parent
1169a08747
commit
388cd5166e
@ -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":
|
||||
|
Loading…
x
Reference in New Issue
Block a user