make sure to waitsub in sparse test

This commit is contained in:
Giovanni Petrantoni 2020-06-26 16:24:56 +09:00
parent 03801fcc52
commit ab8d7cc968
2 changed files with 3 additions and 2 deletions

View File

@ -552,7 +552,7 @@ method publish*(g: GossipSub,
let msg = newMessage(g.peerInfo, data, topic, g.sign)
debug "created new message", msg
debug "publishing on topic", name = topic
debug "publishing on topic", name = topic, peers = peers
if msg.msgId notin g.mcache:
g.mcache.put(msg)

View File

@ -398,6 +398,7 @@ suite "GossipSub":
seenFut.complete()
subs &= dialer.subscribe("foobar", handler)
subs &= waitSub(nodes[0], dialer, "foobar")
await allFuturesThrowing(subs)
await wait(nodes[0].publish("foobar",