Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Sep 26, 2024
1 parent bd0d4ff commit 55552e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/integrations/mcs/scheduling/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/pingcap/failpoint"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/log"
"github.com/stretchr/testify/suite"
"github.com/tikv/pd/pkg/core"
_ "github.com/tikv/pd/pkg/mcs/scheduling/server/apis/v1"
Expand All @@ -24,9 +25,11 @@ import (
"github.com/tikv/pd/pkg/statistics"
"github.com/tikv/pd/pkg/storage"
"github.com/tikv/pd/pkg/utils/apiutil"
"github.com/tikv/pd/pkg/utils/etcdutil"
"github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/tests"
"go.uber.org/zap"
)

type apiTestSuite struct {
Expand Down Expand Up @@ -517,7 +520,10 @@ func (suite *apiTestSuite) checkFollowerForward(cluster *tests.TestCluster) {
leader := cluster.GetLeaderServer()
cli := leader.GetEtcdClient()
testutil.Eventually(re, func() bool {
_, err = cli.MemberRemove(context.Background(), follower.GetServer().GetMember().ID())
_, err = etcdutil.RemoveEtcdMember(cli, follower.GetServerID())
if err != nil {
log.Info("failed to remove member", zap.Error(err))
}
return err == nil
})
testutil.Eventually(re, func() bool {
Expand Down

0 comments on commit 55552e1

Please sign in to comment.