mirror of https://github.com/waku-org/nwaku.git
fix(tests): Compilation failure fix (#2222)
* Add missing required keywords.
This commit is contained in:
parent
bd25191a74
commit
a5da1fc494
|
@ -1,27 +1,38 @@
|
|||
{.used.}
|
||||
|
||||
import
|
||||
std/[options, tables, sequtils],
|
||||
std/[
|
||||
options,
|
||||
tables,
|
||||
sequtils
|
||||
],
|
||||
stew/shims/net as stewNet,
|
||||
testutils/unittests,
|
||||
chronos,
|
||||
chronicles,
|
||||
os,
|
||||
libp2p/peerstore,
|
||||
libp2p/crypto/crypto
|
||||
libp2p/[
|
||||
peerstore,
|
||||
crypto/crypto
|
||||
]
|
||||
|
||||
import
|
||||
../../../waku/waku_core,
|
||||
../../../waku/node/peer_manager,
|
||||
../../../waku/node/waku_node,
|
||||
../../../waku/waku_filter_v2,
|
||||
../../../waku/waku_filter_v2/client,
|
||||
../../../waku/waku_filter_v2/subscriptions,
|
||||
../testlib/common,
|
||||
../testlib/wakucore,
|
||||
../testlib/wakunode,
|
||||
../testlib/testasync,
|
||||
../testlib/futures
|
||||
../../../waku/[
|
||||
waku_core,
|
||||
node/peer_manager,
|
||||
node/waku_node,
|
||||
waku_filter_v2,
|
||||
waku_filter_v2/client,
|
||||
waku_filter_v2/subscriptions
|
||||
],
|
||||
../testlib/[
|
||||
common,
|
||||
wakucore,
|
||||
wakunode,
|
||||
testasync,
|
||||
futures,
|
||||
testutils
|
||||
]
|
||||
|
||||
let FUTURE_TIMEOUT = 1.seconds
|
||||
|
||||
|
@ -185,7 +196,7 @@ suite "Waku Filter - End to End":
|
|||
# And the client node reboots
|
||||
waitFor client.stop()
|
||||
waitFor client.start()
|
||||
client.mountFilterClient()
|
||||
discard client.mountFilterClient()
|
||||
|
||||
# When a message is sent to the subscribed content topic, via Relay
|
||||
let msg = fakeWakuMessage(contentTopic=contentTopic)
|
||||
|
|
|
@ -239,7 +239,7 @@ suite "Waku Relay":
|
|||
|
||||
asyncTest "Refreshing subscription":
|
||||
# Given a subscribed node
|
||||
node.subscribe(pubsubTopic, simpleFutureHandler)
|
||||
discard node.subscribe(pubsubTopic, simpleFutureHandler)
|
||||
check:
|
||||
node.isSubscribed(pubsubTopic)
|
||||
node.subscribedTopics == pubsubTopicSeq
|
||||
|
@ -252,7 +252,7 @@ suite "Waku Relay":
|
|||
var otherHandlerFuture = newPushHandlerFuture()
|
||||
proc otherSimpleFutureHandler(topic: PubsubTopic, message: WakuMessage) {.async, gcsafe.} =
|
||||
otherHandlerFuture.complete((topic, message))
|
||||
node.subscribe(pubsubTopic, otherSimpleFutureHandler)
|
||||
discard node.subscribe(pubsubTopic, otherSimpleFutureHandler)
|
||||
check:
|
||||
node.isSubscribed(pubsubTopic)
|
||||
node.subscribedTopics == pubsubTopicSeq
|
||||
|
@ -297,14 +297,14 @@ suite "Waku Relay":
|
|||
otherHandlerFuture.complete((topic, message))
|
||||
|
||||
otherNode.addValidator(pubsubTopic, len4Validator)
|
||||
otherNode.subscribe(pubsubTopic, otherSimpleFutureHandler)
|
||||
discard otherNode.subscribe(pubsubTopic, otherSimpleFutureHandler)
|
||||
await sleepAsync(500.millis)
|
||||
check:
|
||||
otherNode.isSubscribed(pubsubTopic)
|
||||
|
||||
# Given a subscribed node with a validator
|
||||
node.addValidator(pubsubTopic, len4Validator)
|
||||
node.subscribe(pubsubTopic, simpleFutureHandler)
|
||||
discard node.subscribe(pubsubTopic, simpleFutureHandler)
|
||||
await sleepAsync(500.millis)
|
||||
check:
|
||||
node.isSubscribed(pubsubTopic)
|
||||
|
@ -784,7 +784,7 @@ suite "Waku Relay":
|
|||
|
||||
asyncTest "Single Node with Single Pubsub Topic":
|
||||
# Given a node subscribed to a pubsub topic
|
||||
node.subscribe(pubsubTopic, simpleFutureHandler)
|
||||
discard node.subscribe(pubsubTopic, simpleFutureHandler)
|
||||
check node.subscribedTopics == pubsubTopicSeq
|
||||
|
||||
# When unsubscribing from all pubsub topics
|
||||
|
|
Loading…
Reference in New Issue