Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler_test: change scheduler check order #8613

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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