From bbe3f94668b2e0a1851f2747491dde869f145d63 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 19 Oct 2023 09:12:10 -0400 Subject: [PATCH] test --- main_test.go | 2 +- utils_test.go | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/main_test.go b/main_test.go index a837a11..a1c1b72 100644 --- a/main_test.go +++ b/main_test.go @@ -24,7 +24,7 @@ func (s *StoreSuite) TestBasic() { startTime := time.Now() endTime := time.Now() - ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) // Test shouldnt take more than 60s + ctx, cancel := context.WithTimeout(context.Background(), 500*time.Second) // Test shouldnt take more than 60s defer cancel() // Connecting to nodes diff --git a/utils_test.go b/utils_test.go index fa3cbec..64d4747 100644 --- a/utils_test.go +++ b/utils_test.go @@ -104,9 +104,10 @@ func queryNode(ctx context.Context, node *node.WakuNode, addr string, pubsubTopi cursorIterations := 0 result, err := node.Store().Query(ctx, store.Query{ - Topic: pubsubTopic, - StartTime: 1694630160000000000, - EndTime: 1694630700000000000, + Topic: "/waku/2/default-waku/proto", + StartTime: time.Now().Add(time.Duration(-30) * time.Minute).UnixNano(), + EndTime: time.Now().UnixNano(), + ContentTopics: []string{"/waku/1/0xee3a5ba0/rfc26"}, }, store.WithPeer(info.ID), store.WithPaging(false, 100), store.WithRequestId([]byte{1, 2, 3, 4, 5, 6, 7, 8})) if err != nil { return -1, err @@ -127,11 +128,7 @@ func queryNode(ctx context.Context, node *node.WakuNode, addr string, pubsubTopi env := protocol.NewEnvelope(msg, time.Now().UnixNano(), relay.DefaultWakuTopic) envHash := hexutil.Encode(env.Hash()) - hash := "0x322090c57231578a86adb5ab4cbcf4d1d66458ef7f6a579e551cc71c88be5e75" - if envHash == hash { - fmt.Println("FOUND!!!!!!") - panic("BYE") - } + fmt.Println(envHash, env.Message().ContentTopic, env.Message().Timestamp) } cnt += len(result.GetMessages())