From f5d6cf3bd1f1afa906cd573ac5190ae7c2984721 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 22 Feb 2018 11:04:04 +0200 Subject: [PATCH] TestGossipsubGraftPruneCoalesce is TestGossipsubGraftPruneRetry it is really testing full queues (sized 32) and retries of control messages and announces --- gossipsub_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gossipsub_test.go b/gossipsub_test.go index 2a86384..a645b7d 100644 --- a/gossipsub_test.go +++ b/gossipsub_test.go @@ -593,7 +593,7 @@ func TestGossipsubRemovePeer(t *testing.T) { } } -func TestGossipsubGraftPruneCoalesce(t *testing.T) { +func TestGossipsubGraftPruneRetry(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -603,8 +603,9 @@ func TestGossipsubGraftPruneCoalesce(t *testing.T) { var topics []string var msgs [][]*Subscription - for i := 0; i < 100; i++ { + for i := 0; i < 50; i++ { topic := fmt.Sprintf("topic%d", i) + topics = append(topics, topic) var subs []*Subscription for _, ps := range psubs { @@ -615,12 +616,11 @@ func TestGossipsubGraftPruneCoalesce(t *testing.T) { subs = append(subs, subch) } - msgs = append(msgs, subs) } // wait for heartbeats to build meshes - time.Sleep(time.Second * 2) + time.Sleep(time.Second * 5) for i, topic := range topics { msg := []byte(fmt.Sprintf("%d it's not a floooooood %d", i, i))