mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-05 22:33:10 +00:00
TestGossipsubGraftPruneCoalesce is TestGossipsubGraftPruneRetry
it is really testing full queues (sized 32) and retries of control messages and announces
This commit is contained in:
parent
009efebdaf
commit
f5d6cf3bd1
@ -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())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
@ -603,8 +603,9 @@ func TestGossipsubGraftPruneCoalesce(t *testing.T) {
|
|||||||
|
|
||||||
var topics []string
|
var topics []string
|
||||||
var msgs [][]*Subscription
|
var msgs [][]*Subscription
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 50; i++ {
|
||||||
topic := fmt.Sprintf("topic%d", i)
|
topic := fmt.Sprintf("topic%d", i)
|
||||||
|
topics = append(topics, topic)
|
||||||
|
|
||||||
var subs []*Subscription
|
var subs []*Subscription
|
||||||
for _, ps := range psubs {
|
for _, ps := range psubs {
|
||||||
@ -615,12 +616,11 @@ func TestGossipsubGraftPruneCoalesce(t *testing.T) {
|
|||||||
|
|
||||||
subs = append(subs, subch)
|
subs = append(subs, subch)
|
||||||
}
|
}
|
||||||
|
|
||||||
msgs = append(msgs, subs)
|
msgs = append(msgs, subs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for heartbeats to build meshes
|
// wait for heartbeats to build meshes
|
||||||
time.Sleep(time.Second * 2)
|
time.Sleep(time.Second * 5)
|
||||||
|
|
||||||
for i, topic := range topics {
|
for i, topic := range topics {
|
||||||
msg := []byte(fmt.Sprintf("%d it's not a floooooood %d", i, i))
|
msg := []byte(fmt.Sprintf("%d it's not a floooooood %d", i, i))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user