mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 01:14:56 +00:00
deploy: d45e3c8f7aa7c8c8eff85b6719672293834571aa
This commit is contained in:
parent
f36a3a0407
commit
8ab0025820
@ -54,6 +54,11 @@ procSuite "Waku Store":
|
|||||||
|
|
||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with multiple content filters":
|
asyncTest "handle query with multiple content filters":
|
||||||
let
|
let
|
||||||
key = PrivateKey.random(ECDSA, rng[]).get()
|
key = PrivateKey.random(ECDSA, rng[]).get()
|
||||||
@ -96,6 +101,10 @@ procSuite "Waku Store":
|
|||||||
|
|
||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with pubsub topic filter":
|
asyncTest "handle query with pubsub topic filter":
|
||||||
let
|
let
|
||||||
@ -144,6 +153,10 @@ procSuite "Waku Store":
|
|||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with pubsub topic filter with no match":
|
asyncTest "handle query with pubsub topic filter with no match":
|
||||||
let
|
let
|
||||||
key = PrivateKey.random(ECDSA, rng[]).get()
|
key = PrivateKey.random(ECDSA, rng[]).get()
|
||||||
@ -185,6 +198,11 @@ procSuite "Waku Store":
|
|||||||
|
|
||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with pubsub topic filter matching the entire stored messages":
|
asyncTest "handle query with pubsub topic filter matching the entire stored messages":
|
||||||
let
|
let
|
||||||
key = PrivateKey.random(ECDSA, rng[]).get()
|
key = PrivateKey.random(ECDSA, rng[]).get()
|
||||||
@ -229,6 +247,10 @@ procSuite "Waku Store":
|
|||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with store and restarts":
|
asyncTest "handle query with store and restarts":
|
||||||
let
|
let
|
||||||
key = PrivateKey.random(ECDSA, rng[]).get()
|
key = PrivateKey.random(ECDSA, rng[]).get()
|
||||||
@ -292,6 +314,10 @@ procSuite "Waku Store":
|
|||||||
|
|
||||||
check:
|
check:
|
||||||
(await completionFut2.withTimeout(5.seconds)) == true
|
(await completionFut2.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with forward pagination":
|
asyncTest "handle query with forward pagination":
|
||||||
let
|
let
|
||||||
@ -342,6 +368,10 @@ procSuite "Waku Store":
|
|||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle query with backward pagination":
|
asyncTest "handle query with backward pagination":
|
||||||
let
|
let
|
||||||
key = PrivateKey.random(ECDSA, rng[]).get()
|
key = PrivateKey.random(ECDSA, rng[]).get()
|
||||||
@ -389,6 +419,10 @@ procSuite "Waku Store":
|
|||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "handle queries with no paging info (auto-paginate)":
|
asyncTest "handle queries with no paging info (auto-paginate)":
|
||||||
let
|
let
|
||||||
key = PrivateKey.random(ECDSA, rng[]).get()
|
key = PrivateKey.random(ECDSA, rng[]).get()
|
||||||
@ -439,6 +473,10 @@ procSuite "Waku Store":
|
|||||||
check:
|
check:
|
||||||
(await completionFut.withTimeout(5.seconds)) == true
|
(await completionFut.withTimeout(5.seconds)) == true
|
||||||
|
|
||||||
|
# free resources
|
||||||
|
await allFutures(dialSwitch.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
test "Index Protobuf encoder/decoder test":
|
test "Index Protobuf encoder/decoder test":
|
||||||
let
|
let
|
||||||
index = computeIndex(WakuMessage(payload: @[byte 1], contentTopic: defaultContentTopic))
|
index = computeIndex(WakuMessage(payload: @[byte 1], contentTopic: defaultContentTopic))
|
||||||
@ -666,17 +704,19 @@ procSuite "Waku Store":
|
|||||||
|
|
||||||
asyncTest "resume message history":
|
asyncTest "resume message history":
|
||||||
# starts a new node
|
# starts a new node
|
||||||
var dialSwitch2 = newStandardSwitch()
|
var dialSwitch3 = newStandardSwitch()
|
||||||
await dialSwitch2.start()
|
await dialSwitch3.start()
|
||||||
|
|
||||||
let proto2 = WakuStore.init(PeerManager.new(dialSwitch2), crypto.newRng())
|
let proto3 = WakuStore.init(PeerManager.new(dialSwitch2), crypto.newRng())
|
||||||
proto2.setPeer(listenSwitch.peerInfo.toRemotePeerInfo())
|
proto3.setPeer(listenSwitch.peerInfo.toRemotePeerInfo())
|
||||||
|
|
||||||
let successResult = await proto2.resume()
|
let successResult = await proto3.resume()
|
||||||
check:
|
check:
|
||||||
successResult.isOk
|
successResult.isOk
|
||||||
successResult.value == 10
|
successResult.value == 10
|
||||||
proto2.messages.len == 10
|
proto3.messages.len == 10
|
||||||
|
|
||||||
|
await dialSwitch3.stop()
|
||||||
|
|
||||||
asyncTest "queryFrom":
|
asyncTest "queryFrom":
|
||||||
|
|
||||||
@ -723,7 +763,10 @@ procSuite "Waku Store":
|
|||||||
let successResult = await proto3.resume(some(@[offListenSwitch.peerInfo.toRemotePeerInfo()]))
|
let successResult = await proto3.resume(some(@[offListenSwitch.peerInfo.toRemotePeerInfo()]))
|
||||||
check:
|
check:
|
||||||
successResult.isErr
|
successResult.isErr
|
||||||
await dialSwitch3.stop()
|
|
||||||
|
#free resources
|
||||||
|
await allFutures(dialSwitch3.stop(),
|
||||||
|
offListenSwitch.stop())
|
||||||
|
|
||||||
asyncTest "resume history from a list of candidate peers":
|
asyncTest "resume history from a list of candidate peers":
|
||||||
|
|
||||||
@ -746,8 +789,15 @@ procSuite "Waku Store":
|
|||||||
successResult.isOk
|
successResult.isOk
|
||||||
successResult.value == 14
|
successResult.value == 14
|
||||||
|
|
||||||
|
#free resources
|
||||||
|
await allFutures(dialSwitch3.stop(),
|
||||||
|
offListenSwitch.stop())
|
||||||
|
|
||||||
|
#free resources
|
||||||
await allFutures(dialSwitch.stop(),
|
await allFutures(dialSwitch.stop(),
|
||||||
dialSwitch2.stop())
|
dialSwitch2.stop(),
|
||||||
|
listenSwitch.stop())
|
||||||
|
|
||||||
|
|
||||||
asyncTest "limit store capacity":
|
asyncTest "limit store capacity":
|
||||||
let
|
let
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# libtool - Provide generalized library-building support services.
|
# libtool - Provide generalized library-building support services.
|
||||||
# Generated automatically by config.status (libbacktrace) version-unused
|
# Generated automatically by config.status (libbacktrace) version-unused
|
||||||
# Libtool was configured on host fv-az190-241:
|
# Libtool was configured on host fv-az272-202:
|
||||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user