fix: failed to get failpoints from member

This commit is contained in:
tangcong 2021-04-26 11:43:50 +08:00
parent cc52d994b7
commit 370f9cf3b9
2 changed files with 4 additions and 2 deletions

View File

@ -113,8 +113,6 @@ func NewCluster(lg *zap.Logger, fpath string) (*Cluster, error) {
}
go clus.serveTesterServer()
clus.updateCases()
clus.rateLimiter = rate.NewLimiter(
rate.Limit(int(clus.Tester.StressQPS)),
int(clus.Tester.StressQPS),

View File

@ -33,6 +33,10 @@ const compactQPS = 50000
func (clus *Cluster) Run() {
defer printReport()
// updateCases must be executed after etcd is started, because the FAILPOINTS case
// needs to obtain all the failpoints from the etcd member.
clus.updateCases()
if err := fileutil.TouchDirAll(clus.Tester.DataDir); err != nil {
clus.lg.Panic(
"failed to create test data directory",