From abcdaaf84a525a579cd3bfdf060ba848b606fc90 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Wed, 13 Nov 2024 15:00:03 +0800 Subject: [PATCH] fix local id panic Signed-off-by: Ryan Leung --- tests/integrations/mcs/scheduling/api_test.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/integrations/mcs/scheduling/api_test.go b/tests/integrations/mcs/scheduling/api_test.go index 443bee2cd6a..f3e7f235018 100644 --- a/tests/integrations/mcs/scheduling/api_test.go +++ b/tests/integrations/mcs/scheduling/api_test.go @@ -508,6 +508,8 @@ func (suite *apiTestSuite) checkAdminRegionCacheForward(cluster *tests.TestClust func (suite *apiTestSuite) TestFollowerForward() { suite.env.RunTestBasedOnMode(suite.checkFollowerForward) + suite.TearDownSuite() + suite.SetupSuite() } func (suite *apiTestSuite) checkFollowerForward(cluster *tests.TestCluster) { @@ -517,20 +519,6 @@ func (suite *apiTestSuite) checkFollowerForward(cluster *tests.TestCluster) { defer cancel() follower, err := cluster.JoinAPIServer(ctx) re.NoError(err) - defer func() { - leader := cluster.GetLeaderServer() - cli := leader.GetEtcdClient() - testutil.Eventually(re, func() bool { - _, err = cli.MemberRemove(context.Background(), follower.GetServer().GetMember().ID()) - return err == nil - }) - testutil.Eventually(re, func() bool { - res, err := cli.MemberList(context.Background()) - return err == nil && len(res.Members) == 1 - }) - cluster.DeleteServer(follower.GetConfig().Name) - follower.Destroy() - }() re.NoError(follower.Run()) re.NotEmpty(cluster.WaitLeader())