From a0562b3fedcb7278e1edc745ebf53822846cb337 Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Thu, 21 Sep 2023 13:09:49 +0800 Subject: [PATCH] update time Signed-off-by: lhy1024 --- pkg/schedule/schedulers/scheduler_controller.go | 1 + tests/pdctl/scheduler/scheduler_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/schedule/schedulers/scheduler_controller.go b/pkg/schedule/schedulers/scheduler_controller.go index 69cd689678b1..9e46b584543a 100644 --- a/pkg/schedule/schedulers/scheduler_controller.go +++ b/pkg/schedule/schedulers/scheduler_controller.go @@ -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 diff --git a/tests/pdctl/scheduler/scheduler_test.go b/tests/pdctl/scheduler/scheduler_test.go index f632d88f969f..a268d99da473 100644 --- a/tests/pdctl/scheduler/scheduler_test.go +++ b/tests/pdctl/scheduler/scheduler_test.go @@ -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")) }