Skip to content

Commit

Permalink
fix: unskip shard 0 test fixed by 1874 (#1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarbu15 authored Apr 25, 2024
1 parent 66081d6 commit 86249df
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions packages/tests/tests/sharding/static_sharding.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,43 @@ describe("Static Sharding: Running Nodes", function () {
});

describe("Different clusters and shards", function () {
// Will be skipped until https://github.com/waku-org/js-waku/issues/1874 is fixed
it.skip("shard 0", async function () {
it("shard 0", async function () {
const singleShardInfo = { clusterId: 0, shard: 0 };
const shardInfo = singleShardInfosToShardInfo([singleShardInfo]);

await nwaku.start({
store: true,
lightpush: true,
relay: true,
pubsubTopic: shardInfoToPubsubTopics(shardInfo)
});

await nwaku.ensureSubscriptions(shardInfoToPubsubTopics(shardInfo));

waku = await createLightNode({
shardInfo: shardInfo
});
await waku.dial(await nwaku.getMultiaddrWithId());
await waitForRemotePeer(waku, [Protocols.LightPush]);

const encoder = createEncoder({
contentTopic: ContentTopic,
pubsubTopicShardInfo: singleShardInfo
});
expect(encoder.pubsubTopic).to.eq(
singleShardInfoToPubsubTopic(singleShardInfo)
);

const request = await waku.lightPush.send(encoder, {
payload: utf8ToBytes("Hello World")
});

expect(request.successes.length).to.eq(1);
expect(
await messageCollector.waitForMessages(1, {
pubsubTopic: shardInfoToPubsubTopics(shardInfo)[0]
})
).to.eq(true);
});

// dedicated test for Default Cluster ID 0
Expand Down

0 comments on commit 86249df

Please sign in to comment.