Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/libp2p/mix/component/test_cover_traffic.nim
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ suite "Cover Traffic - Integration":

asyncTest "slot exhaustion blocks local send, epoch reset unblocks":
let nodes = await setupMixNodes(5)
startAndDeferStop(nodes)
let (destNode, _) = await setupDestNode(NoReplyProtocol.new())
await startNodes(nodes)
defer:
await stopNodes(nodes)
await stopDestNode(destNode)

let ct = ConstantRateCoverTraffic.new(totalSlots = 2, useInternalEpochTimer = false)
ct.onEpochChange(1)
nodes[0].coverTraffic = Opt.some(CoverTraffic(ct))

let (destNode, _) = await setupDestNode(NoReplyProtocol.new())
defer:
await stopDestNode(destNode)

let incoming = newAsyncQueue[seq[byte]]()

# First send succeeds (claims 1 of 2 slots)
Expand Down
2 changes: 1 addition & 1 deletion tests/libp2p/mix/utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ proc new*(T: typedesc[NoReplyProtocol]): NoReplyProtocol =
ReceivedMessage(connPeerId: conn.peerId, data: buffer)
)
except LPStreamError:
raiseAssert "should not happen"
discard
finally:
await conn.close()

Expand Down
Loading