2020-05-14 13:43:36 +00:00
|
|
|
package sync
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io/ioutil"
|
2020-11-14 02:28:14 +00:00
|
|
|
"os"
|
2020-05-14 13:43:36 +00:00
|
|
|
"testing"
|
|
|
|
|
2020-05-15 08:53:19 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/flags"
|
2020-05-14 13:43:36 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2020-11-14 02:28:14 +00:00
|
|
|
run := func() int {
|
|
|
|
logrus.SetLevel(logrus.DebugLevel)
|
|
|
|
logrus.SetOutput(ioutil.Discard)
|
2020-05-14 13:43:36 +00:00
|
|
|
|
2020-11-14 02:28:14 +00:00
|
|
|
resetFlags := flags.Get()
|
|
|
|
flags.Init(&flags.GlobalFlags{
|
|
|
|
BlockBatchLimit: 64,
|
|
|
|
BlockBatchLimitBurstFactor: 10,
|
|
|
|
})
|
|
|
|
defer func() {
|
|
|
|
flags.Init(resetFlags)
|
|
|
|
}()
|
|
|
|
return m.Run()
|
|
|
|
}
|
|
|
|
os.Exit(run())
|
2020-05-14 13:43:36 +00:00
|
|
|
}
|