From 71384dfdfddd0ddea89488f841b555c6c3133e8d Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Tue, 27 Aug 2024 21:53:16 +0200 Subject: [PATCH] chore: change amount of used peers to 2 (#2111) * chore: change amount of used peers to 2 * up * up * up tests --- packages/sdk/src/protocols/base_protocol.ts | 2 +- packages/tests/src/utils/nodes.ts | 2 +- packages/tests/tests/filter/subscribe.node.spec.ts | 2 +- packages/tests/tests/light-push/index.node.spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sdk/src/protocols/base_protocol.ts b/packages/sdk/src/protocols/base_protocol.ts index 8b6343a895..85ef746e1d 100644 --- a/packages/sdk/src/protocols/base_protocol.ts +++ b/packages/sdk/src/protocols/base_protocol.ts @@ -14,7 +14,7 @@ interface Options { } const RENEW_TIME_LOCK_DURATION = 30 * 1000; -const DEFAULT_NUM_PEERS_TO_USE = 3; +const DEFAULT_NUM_PEERS_TO_USE = 2; const DEFAULT_MAINTAIN_PEERS_INTERVAL = 30_000; export class BaseProtocolSDK implements IBaseProtocolSDK { diff --git a/packages/tests/src/utils/nodes.ts b/packages/tests/src/utils/nodes.ts index 511694a5d6..46423f5cdb 100644 --- a/packages/tests/src/utils/nodes.ts +++ b/packages/tests/src/utils/nodes.ts @@ -23,7 +23,7 @@ export async function runMultipleNodes( networkConfig: NetworkConfig = DefaultNetworkConfig, customArgs?: Args, strictChecking: boolean = false, - numServiceNodes = 3, + numServiceNodes = 2, withoutFilter = false ): Promise<[ServiceNodesFleet, LightNode]> { // create numServiceNodes nodes diff --git a/packages/tests/tests/filter/subscribe.node.spec.ts b/packages/tests/tests/filter/subscribe.node.spec.ts index 46a0cf9989..354f47db15 100644 --- a/packages/tests/tests/filter/subscribe.node.spec.ts +++ b/packages/tests/tests/filter/subscribe.node.spec.ts @@ -51,7 +51,7 @@ const runTests = (strictCheckNodes: boolean): void => { }); it("Subscribe and receive messages via lightPush", async function () { - expect(waku.libp2p.getConnections()).has.length(3); + expect(waku.libp2p.getConnections()).has.length(2); await waku.filter.subscribe( [TestDecoder], diff --git a/packages/tests/tests/light-push/index.node.spec.ts b/packages/tests/tests/light-push/index.node.spec.ts index 43f6d10970..4acdb6eb5d 100644 --- a/packages/tests/tests/light-push/index.node.spec.ts +++ b/packages/tests/tests/light-push/index.node.spec.ts @@ -23,7 +23,7 @@ import { } from "./utils.js"; const runTests = (strictNodeCheck: boolean): void => { - const numServiceNodes = 3; + const numServiceNodes = 2; describe(`Waku Light Push: Multiple Nodes: Strict Check: ${strictNodeCheck}`, function () { // Set the timeout for all tests in this suite. Can be overwritten at test level this.timeout(15000);