Skip to content

Commit

Permalink
fix: adding delay between dials (#1973)
Browse files Browse the repository at this point in the history
* fix: adding delay between dials

* removing comment
  • Loading branch information
gabrielmer authored Apr 24, 2024
1 parent 5fb1006 commit 80a9525
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/tests/tests/getPeers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Sinon from "sinon";
import {
afterEachCustom,
beforeEachCustom,
delay,
isNwakuAtLeast,
makeLogFileName,
resolveAutoshardingCluster,
Expand Down Expand Up @@ -170,6 +171,7 @@ describe("getConnectedPeersForProtocolAndShard", function () {

waku = await createLightNode({ shardInfo: shardInfo2 });
await waku.libp2p.dialProtocol(serviceNode1Ma, LightPushCodec);
await delay(500);
await waku.libp2p.dialProtocol(serviceNode2Ma, LightPushCodec);

await waku.start();
Expand Down Expand Up @@ -223,6 +225,7 @@ describe("getConnectedPeersForProtocolAndShard", function () {

waku = await createLightNode({ shardInfo: shardInfo2 });
await waku.libp2p.dialProtocol(serviceNodeMa1, LightPushCodec);
await delay(500);
await waku.libp2p.dialProtocol(serviceNodeMa2, LightPushCodec);
await waku.start();
await waitForRemotePeer(waku, [Protocols.LightPush]);
Expand Down Expand Up @@ -362,6 +365,7 @@ describe("getConnectedPeersForProtocolAndShard", function () {

waku = await createLightNode({ shardInfo: shardInfo2 });
await waku.libp2p.dialProtocol(serviceNode1Ma, LightPushCodec);
await delay(500);
await waku.libp2p.dialProtocol(serviceNode2Ma, LightPushCodec);

await waku.start();
Expand Down Expand Up @@ -416,6 +420,7 @@ describe("getConnectedPeersForProtocolAndShard", function () {

waku = await createLightNode({ shardInfo: shardInfo2 });
await waku.libp2p.dialProtocol(serviceNodeMa1, LightPushCodec);
await delay(500);
await waku.libp2p.dialProtocol(serviceNodeMa2, LightPushCodec);
await waku.start();
await waitForRemotePeer(waku, [Protocols.LightPush]);
Expand Down

0 comments on commit 80a9525

Please sign in to comment.