Skip to content

Commit

Permalink
change order
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <ihusharp@gmail.com>
  • Loading branch information
HuSharp committed Sep 10, 2024
1 parent 8871760 commit ea0c8c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/pd-ctl/tests/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion tools/pd-simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```
Expand All @@ -53,4 +55,4 @@ tikv conf
case-name="redundant-balance-region"
sim-tick-interval="1s"
store-io-per-second=100
```
```
3 changes: 2 additions & 1 deletion tools/pd-simulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ea0c8c1

Please sign in to comment.