github.com/prysmaticlabs/prysm@v1.4.4/beacon-chain/p2p/peers/peers_test.go (about) 1 package peers_test 2 3 import ( 4 "io/ioutil" 5 "testing" 6 7 "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" 8 "github.com/prysmaticlabs/prysm/shared/featureconfig" 9 "github.com/sirupsen/logrus" 10 ) 11 12 func TestMain(m *testing.M) { 13 logrus.SetLevel(logrus.DebugLevel) 14 logrus.SetOutput(ioutil.Discard) 15 16 resetCfg := featureconfig.InitWithReset(&featureconfig.Flags{ 17 EnablePeerScorer: true, 18 }) 19 defer resetCfg() 20 21 resetFlags := flags.Get() 22 flags.Init(&flags.GlobalFlags{ 23 BlockBatchLimit: 64, 24 BlockBatchLimitBurstFactor: 10, 25 }) 26 defer func() { 27 flags.Init(resetFlags) 28 }() 29 m.Run() 30 }