mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-10 19:06:28 +00:00
[sales] Fix intermittently failing test (#591)
This commit is contained in:
parent
c28627d16f
commit
a77d0cdcec
@ -296,11 +296,14 @@ asyncchecksuite "Sales":
|
|||||||
let blk = bt.Block.new( @[1.byte] ).get
|
let blk = bt.Block.new( @[1.byte] ).get
|
||||||
onBatch(@[ blk ])
|
onBatch(@[ blk ])
|
||||||
return success()
|
return success()
|
||||||
|
let sold = newFuture[void]()
|
||||||
|
sales.onSale = proc(request: StorageRequest, slotIndex: UInt256) =
|
||||||
|
sold.complete()
|
||||||
|
|
||||||
createAvailability()
|
createAvailability()
|
||||||
let origSize = availability.size
|
let origSize = availability.size
|
||||||
await market.requestStorage(request)
|
await market.requestStorage(request)
|
||||||
await sleepAsync(2.millis) # allow proving to start
|
await sold # allow proving to start
|
||||||
|
|
||||||
# complete request
|
# complete request
|
||||||
market.slotState[request.slotId(slotIndex)] = SlotState.Finished
|
market.slotState[request.slotId(slotIndex)] = SlotState.Finished
|
||||||
|
Loading…
x
Reference in New Issue
Block a user