Skip to content

Commit

Permalink
make TestRateLimitConfigReload stable
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Apr 18, 2024
1 parent d64e698 commit 123688c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/server/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
tu "github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/tests"
)
Expand Down Expand Up @@ -74,11 +73,7 @@ func TestRateLimitConfigReload(t *testing.T) {

oldLeaderName := leader.GetServer().Name()
leader.GetServer().GetMember().ResignEtcdLeader(leader.GetServer().Context(), oldLeaderName, "")
var servers []*server.Server
for _, s := range cluster.GetServers() {
servers = append(servers, s.GetServer())
}
server.MustWaitLeader(re, servers)
re.NotEmpty(cluster.WaitLeader())
leader = cluster.GetLeaderServer()
re.NotNil(leader)
re.True(leader.GetServer().GetServiceMiddlewarePersistOptions().IsRateLimitEnabled())
Expand Down

0 comments on commit 123688c

Please sign in to comment.