From 8ab002582093f2d799d2cf4ca996dad790cc854a Mon Sep 17 00:00:00 2001 From: oskarth Date: Tue, 25 Jan 2022 02:55:37 +0000 Subject: [PATCH] deploy: d45e3c8f7aa7c8c8eff85b6719672293834571aa --- tests/v2/test_waku_store.nim | 66 ++++++++++++++++--- .../vendor/libbacktrace-upstream/libtool | 2 +- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/tests/v2/test_waku_store.nim b/tests/v2/test_waku_store.nim index 3b684bf9e..36a299424 100644 --- a/tests/v2/test_waku_store.nim +++ b/tests/v2/test_waku_store.nim @@ -54,6 +54,11 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) + asyncTest "handle query with multiple content filters": let key = PrivateKey.random(ECDSA, rng[]).get() @@ -96,6 +101,10 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) asyncTest "handle query with pubsub topic filter": let @@ -144,6 +153,10 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) + asyncTest "handle query with pubsub topic filter with no match": let key = PrivateKey.random(ECDSA, rng[]).get() @@ -185,6 +198,11 @@ procSuite "Waku Store": check: (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": let key = PrivateKey.random(ECDSA, rng[]).get() @@ -229,6 +247,10 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) + asyncTest "handle query with store and restarts": let key = PrivateKey.random(ECDSA, rng[]).get() @@ -292,6 +314,10 @@ procSuite "Waku Store": check: (await completionFut2.withTimeout(5.seconds)) == true + + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) asyncTest "handle query with forward pagination": let @@ -342,6 +368,10 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) + asyncTest "handle query with backward pagination": let key = PrivateKey.random(ECDSA, rng[]).get() @@ -389,6 +419,10 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) + asyncTest "handle queries with no paging info (auto-paginate)": let key = PrivateKey.random(ECDSA, rng[]).get() @@ -439,6 +473,10 @@ procSuite "Waku Store": check: (await completionFut.withTimeout(5.seconds)) == true + # free resources + await allFutures(dialSwitch.stop(), + listenSwitch.stop()) + test "Index Protobuf encoder/decoder test": let index = computeIndex(WakuMessage(payload: @[byte 1], contentTopic: defaultContentTopic)) @@ -666,17 +704,19 @@ procSuite "Waku Store": asyncTest "resume message history": # starts a new node - var dialSwitch2 = newStandardSwitch() - await dialSwitch2.start() + var dialSwitch3 = newStandardSwitch() + await dialSwitch3.start() - let proto2 = WakuStore.init(PeerManager.new(dialSwitch2), crypto.newRng()) - proto2.setPeer(listenSwitch.peerInfo.toRemotePeerInfo()) + let proto3 = WakuStore.init(PeerManager.new(dialSwitch2), crypto.newRng()) + proto3.setPeer(listenSwitch.peerInfo.toRemotePeerInfo()) - let successResult = await proto2.resume() + let successResult = await proto3.resume() check: successResult.isOk successResult.value == 10 - proto2.messages.len == 10 + proto3.messages.len == 10 + + await dialSwitch3.stop() asyncTest "queryFrom": @@ -723,7 +763,10 @@ procSuite "Waku Store": let successResult = await proto3.resume(some(@[offListenSwitch.peerInfo.toRemotePeerInfo()])) check: successResult.isErr - await dialSwitch3.stop() + + #free resources + await allFutures(dialSwitch3.stop(), + offListenSwitch.stop()) asyncTest "resume history from a list of candidate peers": @@ -746,8 +789,15 @@ procSuite "Waku Store": successResult.isOk successResult.value == 14 + #free resources + await allFutures(dialSwitch3.stop(), + offListenSwitch.stop()) + + #free resources await allFutures(dialSwitch.stop(), - dialSwitch2.stop()) + dialSwitch2.stop(), + listenSwitch.stop()) + asyncTest "limit store capacity": let diff --git a/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool b/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool index 3c2d6ea0f..6c1ebad80 100755 --- a/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool +++ b/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool @@ -2,7 +2,7 @@ # libtool - Provide generalized library-building support services. # 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. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,