mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-03 13:23:07 +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())
|
||||
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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user