reduce prune backoff times for opportunistic grafting test

This commit is contained in:
vyzo 2020-04-22 19:11:58 +03:00
parent 1cf5d645f4
commit 6d24f46a13
1 changed files with 6 additions and 0 deletions

View File

@ -1275,9 +1275,15 @@ func TestGossipsubPiggybackControl(t *testing.T) {
} }
func TestGossipsubOpportunisticGrafting(t *testing.T) { func TestGossipsubOpportunisticGrafting(t *testing.T) {
originalGossipSubPruneBackoff := GossipSubPruneBackoff
GossipSubPruneBackoff = 500 * time.Millisecond
originalGossipSubGraftFloodThreshold := GossipSubGraftFloodThreshold
GossipSubGraftFloodThreshold = 100 * time.Millisecond
originalGossipSubOpportunisticGraftTicks := GossipSubOpportunisticGraftTicks originalGossipSubOpportunisticGraftTicks := GossipSubOpportunisticGraftTicks
GossipSubOpportunisticGraftTicks = 2 GossipSubOpportunisticGraftTicks = 2
defer func() { defer func() {
GossipSubPruneBackoff = originalGossipSubPruneBackoff
GossipSubGraftFloodThreshold = originalGossipSubGraftFloodThreshold
GossipSubOpportunisticGraftTicks = originalGossipSubOpportunisticGraftTicks GossipSubOpportunisticGraftTicks = originalGossipSubOpportunisticGraftTicks
}() }()