Skip to content

Commit

Permalink
*: fix TestConfigTTL (#8030)
Browse files Browse the repository at this point in the history
close #7631, close #7712

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Hu# <jinhao.hu@pingcap.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 7, 2024
1 parent cbde636 commit ff3ac73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/server/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
cfg "github.com/tikv/pd/pkg/mcs/scheduling/server/config"
"github.com/tikv/pd/pkg/ratelimit"
sc "github.com/tikv/pd/pkg/schedule/config"
tu "github.com/tikv/pd/pkg/utils/testutil"
Expand Down Expand Up @@ -470,9 +471,10 @@ func (suite *configTestSuite) assertTTLConfig(
}
checkFunc(cluster.GetLeaderServer().GetServer().GetPersistOptions())
if cluster.GetSchedulingPrimaryServer() != nil {
// wait for the scheduling primary server to be synced
options := cluster.GetSchedulingPrimaryServer().GetPersistConfig()
var options *cfg.PersistConfig
tu.Eventually(re, func() bool {
// wait for the scheduling primary server to be synced
options = cluster.GetSchedulingPrimaryServer().GetPersistConfig()
if expectedEqual {
return uint64(999) == options.GetMaxSnapshotCount()
}
Expand Down

0 comments on commit ff3ac73

Please sign in to comment.