From a6d91beb4e7f6eca0f3c0004ad063098e65db7de Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Wed, 11 Dec 2024 15:15:21 +0800 Subject: [PATCH] fix Signed-off-by: Ryan Leung --- tools/pd-ctl/tests/scheduler/scheduler_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/pd-ctl/tests/scheduler/scheduler_test.go b/tools/pd-ctl/tests/scheduler/scheduler_test.go index 027d2eca2ac..8c18e77719f 100644 --- a/tools/pd-ctl/tests/scheduler/scheduler_test.go +++ b/tools/pd-ctl/tests/scheduler/scheduler_test.go @@ -570,8 +570,10 @@ func (suite *schedulerTestSuite) checkSchedulerConfig(cluster *pdTests.TestClust re.Contains(echo, "Success!") conf = make(map[string]any) conf1 = make(map[string]any) - mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "config", "evict-slow-store-scheduler", "show"}, &conf) - re.Equal(3., conf["batch"]) + testutil.Eventually(re, func() bool { + mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "config", "evict-slow-store-scheduler", "show"}, &conf) + return conf["batch"] == 3. + }) echo = mustExec(re, cmd, []string{"-u", pdAddr, "scheduler", "config", "evict-slow-store-scheduler", "set", "batch", "10"}, nil) re.Contains(echo, "Success!") testutil.Eventually(re, func() bool {