diff --git a/gossip_tracer_test.go b/gossip_tracer_test.go index 3dcd5b2..afabdb4 100644 --- a/gossip_tracer_test.go +++ b/gossip_tracer_test.go @@ -21,6 +21,7 @@ func TestBrokenPromises(t *testing.T) { peerA := peer.ID("A") peerB := peer.ID("B") + peerC := peer.ID("C") var msgs []*pb.Message var mids []string @@ -34,6 +35,7 @@ func TestBrokenPromises(t *testing.T) { gt.AddPromise(peerA, mids) gt.AddPromise(peerB, mids) + gt.AddPromise(peerC, mids) // no broken promises yet brokenPromises := gt.GetBrokenPromises() @@ -41,6 +43,9 @@ func TestBrokenPromises(t *testing.T) { t.Fatal("expected no broken promises") } + // throttle one of the peers to save his promises + gt.ThrottlePeer(peerC) + // make promises break time.Sleep(GossipSubIWantFollowupTime + 10*time.Millisecond)