From ea0c8c17217fe56227803d21ae8bfc84dc85afb8 Mon Sep 17 00:00:00 2001 From: husharp Date: Tue, 10 Sep 2024 15:42:14 +0800 Subject: [PATCH] change order Signed-off-by: husharp --- tools/pd-ctl/tests/scheduler/scheduler_test.go | 4 ++-- tools/pd-simulator/README.md | 4 +++- tools/pd-simulator/main.go | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/pd-ctl/tests/scheduler/scheduler_test.go b/tools/pd-ctl/tests/scheduler/scheduler_test.go index 8c96f5ee3fa..f680a4bd2e7 100644 --- a/tools/pd-ctl/tests/scheduler/scheduler_test.go +++ b/tools/pd-ctl/tests/scheduler/scheduler_test.go @@ -320,12 +320,12 @@ func (suite *schedulerTestSuite) checkScheduler(cluster *pdTests.TestCluster) { re.Contains(echo, "Success!") echo = mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "remove", "evict-leader-scheduler-2"}, nil) re.Contains(echo, "Success!") - echo = mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "remove", "evict-leader-scheduler-1"}, nil) - re.Contains(echo, "Unable to update config: scheduler evict-leader-scheduler does not exist.") testutil.Eventually(re, func() bool { // wait for removed scheduler to be synced to scheduling server. echo = mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "config", "evict-leader-scheduler"}, nil) return strings.Contains(echo, "[404] scheduler not found") }) + echo = mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "remove", "evict-leader-scheduler-1"}, nil) + re.Contains(echo, "Unable to update config: scheduler evict-leader-scheduler does not exist.") // test remove and add echo = mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "remove", "balance-hot-region-scheduler"}, nil) diff --git a/tools/pd-simulator/README.md b/tools/pd-simulator/README.md index d0519bfedff..1dc623c7fdd 100644 --- a/tools/pd-simulator/README.md +++ b/tools/pd-simulator/README.md @@ -34,6 +34,8 @@ Run all cases: Run a specific case with an internal PD: +You can check case name in `tools/pd-simulator/simulator/cases/cases.go`. + ```shell ./pd-simulator -case="casename" ``` @@ -53,4 +55,4 @@ tikv conf case-name="redundant-balance-region" sim-tick-interval="1s" store-io-per-second=100 -``` \ No newline at end of file +``` diff --git a/tools/pd-simulator/main.go b/tools/pd-simulator/main.go index 7fe1d3ecedd..609ed3b06e0 100644 --- a/tools/pd-simulator/main.go +++ b/tools/pd-simulator/main.go @@ -68,7 +68,8 @@ func main() { var err error if *configFile != "" { if meta, err = toml.DecodeFile(*configFile, simConfig); err != nil { - simutil.Logger.Fatal("failed to decode file ", zap.Error(err)) + simutil.Logger.Fatal("failed to decode config file, please check the path of the config file", + zap.Error(err), zap.String("config-file", *configFile)) } } if err = simConfig.Adjust(&meta); err != nil {