Skip to content

Commit cd265ba

Browse files
committed
fix test for nwaku master
1 parent 39c1391 commit cd265ba

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/tests/src/lib/runNodes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export async function runNodes<T>(
7676
} else if (isStaticSharding(networkConfig) && options.relayShards) {
7777
const shards = options.relayShards;
7878
nwakuArgs.shard = shards;
79+
nwakuArgs.numShardsInNetwork = 0;
7980

8081
shards.map((shardId) =>
8182
routingInfos.push(createRoutingInfo(networkConfig, { shardId }))

packages/tests/tests/metadata.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,15 @@ describe("Metadata Protocol", function () {
151151
it("receiving a ping from a peer does not overwrite shard info", async function () {
152152
const clusterId = 2;
153153
const shards = [1];
154-
const numShardsInCluster = 8;
154+
const numShardsInCluster = 0; //static sharding
155155

156156
await nwaku1.start({
157157
relay: true,
158158
discv5Discovery: true,
159159
peerExchange: true,
160160
clusterId,
161-
shard: shards
161+
shard: shards,
162+
numShardsInNetwork: numShardsInCluster
162163
});
163164

164165
const nwaku1Ma = await nwaku1.getMultiaddrWithId();

packages/tests/tests/store/different_static_shards.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ describe("Waku Store, different static shards", function () {
138138
store: true,
139139
clusterId: StaticTestClusterId,
140140
shard: [1],
141-
relay: true
141+
relay: true,
142+
numShardsInNetwork: 0 // static sharding
142143
});
143144

144145
// Set up and start a new nwaku node with Default Pubsubtopic
@@ -147,7 +148,8 @@ describe("Waku Store, different static shards", function () {
147148
store: true,
148149
clusterId: StaticTestClusterId,
149150
shard: [2],
150-
relay: true
151+
relay: true,
152+
numShardsInNetwork: 0 // static sharding
151153
});
152154

153155
const totalMsgs = 10;

0 commit comments

Comments
 (0)