Skip to content

Commit

Permalink
chore: possible fix for test fail in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyaprem committed May 10, 2024
1 parent d0f3a10 commit 9ba0298
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions waku/v2/api/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ func (s *FilterApiTestSuite) TestSubscribe() {
for sub := range apiSub.subs {
s.Log.Info("SubDetails:", zap.String("id", sub))
}
s.Require().True(maps.Keys(apiSub.subs)[0] != maps.Keys(apiSub.subs)[1])
s.Log.Info("subs", zap.String("0", maps.Keys(apiSub.subs)[0]), zap.String("1", maps.Keys(apiSub.subs)[1]))
s.Require().NotEqual(maps.Keys(apiSub.subs)[0], maps.Keys(apiSub.subs)[1])
//s.Require().True(maps.Keys(apiSub.subs)[0] != maps.Keys(apiSub.subs)[1])
// Publish msg and confirm it's received twice because of multiplexing
s.PublishMsg(&filter.WakuMsg{PubSubTopic: s.TestTopic, ContentTopic: s.TestContentTopic, Payload: "Test msg"})
cnt := 0
Expand All @@ -67,7 +69,7 @@ func (s *FilterApiTestSuite) TestSubscribe() {
}
s.Require().Equal(cnt, 1)

time.Sleep(20 * time.Second)
time.Sleep(2 * time.Second)
apiSub.Unsubscribe()
for range apiSub.DataCh {
}
Expand Down

0 comments on commit 9ba0298

Please sign in to comment.