From c0aa5111a13a4498a949f66f479e59c60c2c208b Mon Sep 17 00:00:00 2001 From: Roman Zajic Date: Thu, 16 Nov 2023 23:13:19 +0800 Subject: [PATCH] test: extend timeout for single message (#911) --- waku/v2/protocol/filter/filter_push_test.go | 4 ++-- waku/v2/protocol/filter/filter_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/waku/v2/protocol/filter/filter_push_test.go b/waku/v2/protocol/filter/filter_push_test.go index 85efd096e..c50c90053 100644 --- a/waku/v2/protocol/filter/filter_push_test.go +++ b/waku/v2/protocol/filter/filter_push_test.go @@ -118,7 +118,7 @@ func (s *FilterTestSuite) TestValidPayloadsSQL() { func (s *FilterTestSuite) TestLargePayloadsUTF8() { - s.ctx, s.ctxCancel = context.WithTimeout(context.Background(), 20*time.Second) + s.ctx, s.ctxCancel = context.WithTimeout(context.Background(), 40*time.Second) // Subscribe s.subDetails = s.subscribe(s.testTopic, s.testContentTopic, s.fullNodeHost.ID()) @@ -128,7 +128,7 @@ func (s *FilterTestSuite) TestLargePayloadsUTF8() { // Generate large string for i := range messages { - messages[i].payload, _ = tests.GenerateRandomUTF8String(1048576) + messages[i].payload, _ = tests.GenerateRandomUTF8String(153600) s.log.Info("Generated payload with ", zap.String("length", strconv.Itoa(len(messages[i].payload)))) } diff --git a/waku/v2/protocol/filter/filter_test.go b/waku/v2/protocol/filter/filter_test.go index 5011d7cd7..9dabefc91 100644 --- a/waku/v2/protocol/filter/filter_test.go +++ b/waku/v2/protocol/filter/filter_test.go @@ -191,7 +191,7 @@ func (s *FilterTestSuite) waitForMessages(fn func(), subs []*subscription.Subscr if matchOneOfManyMsg(received, expected) { found++ } - case <-time.After(1 * time.Second): + case <-time.After(3 * time.Second): case <-s.ctx.Done(): s.Require().Fail("test exceeded allocated time")