Skip to content

Commit

Permalink
fix: add missing error check
Browse files Browse the repository at this point in the history
  • Loading branch information
romanzac committed Apr 10, 2024
1 parent 1cd52ee commit 891d9a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions waku/v2/node/wakunode2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ func TestStaticShardingLimits(t *testing.T) {
for i := 0; i < 1024; i++ {
shardedPubSubTopics = append(shardedPubSubTopics, fmt.Sprintf("/waku/2/rs/%d/%d", testClusterID, i))
_, err = r1.Subscribe(ctx, protocol.NewContentFilter(shardedPubSubTopics[i], contentTopic1))
require.NoError(t, err)
_, err = r2.Subscribe(ctx, protocol.NewContentFilter(shardedPubSubTopics[i], contentTopic1))
require.NoError(t, err)
time.Sleep(10 * time.Millisecond)
Expand All @@ -491,7 +492,7 @@ func TestStaticShardingLimits(t *testing.T) {
// Prepare message
msg1 := tests.CreateWakuMessage(contentTopic1, utils.GetUnixEpoch(), "test message")

// Select shard to publish to
// Select shard to publish
randomShard := rand.Intn(1024)

// Publish on node1
Expand All @@ -500,12 +501,12 @@ func TestStaticShardingLimits(t *testing.T) {

time.Sleep(1 * time.Second)

s, err := r2.GetSubscriptionWithPubsubTopic(shardedPubSubTopics[randomShard], contentTopic1)
s2, err := r2.GetSubscriptionWithPubsubTopic(shardedPubSubTopics[randomShard], contentTopic1)
require.NoError(t, err)

var wg sync.WaitGroup

// Retrieve on node2
tests.WaitForMsg(t, &wg, s.Ch)
tests.WaitForMsg(t, &wg, s2.Ch)

}

0 comments on commit 891d9a9

Please sign in to comment.