Skip to content

Commit

Permalink
*: make TestRateLimitConfigReload stable (#8092)
Browse files Browse the repository at this point in the history
close #8083

Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx authored Apr 18, 2024
1 parent d64e698 commit 882d2e5
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 882d2e5

Please sign in to comment.