Skip to content

Commit

Permalink
update time
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Sep 21, 2023
1 parent 709c177 commit a0562b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/schedule/schedulers/scheduler_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ func (c *Controller) runScheduler(s *ScheduleController) {
zap.String("scheduler-name", s.Scheduler.GetName()),
errs.ZapError(s.Ctx().Err()))
failpoint.Inject("slowExitScheduler", func() {
log.Info("running slow exit scheduler")
time.Sleep(3 * time.Second)
})
return
Expand Down
1 change: 1 addition & 0 deletions tests/pdctl/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ func TestAddSchedulerWhenServerClosing(t *testing.T) {
output, err = pdctl.ExecuteCommand(cmd, args...)
re.NoError(err)
re.Contains(string(output), "Success!")
time.Sleep(10 * time.Millisecond)
}
re.NoError(failpoint.Disable("github.com/tikv/pd/pkg/schedule/schedulers/slowExitScheduler"))
}

0 comments on commit a0562b3

Please sign in to comment.