From 95e00f55b3c791fd93dc864512fb45c06bf2b10e Mon Sep 17 00:00:00 2001 From: okJiang <819421878@qq.com> Date: Fri, 18 Oct 2024 13:03:22 +0800 Subject: [PATCH] test: make TestStoreWatch stable (#8724) close tikv/pd#8692 Signed-off-by: okJiang <819421878@qq.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- tests/integrations/mcs/scheduling/meta_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integrations/mcs/scheduling/meta_test.go b/tests/integrations/mcs/scheduling/meta_test.go index d134336966a..e55f0281d72 100644 --- a/tests/integrations/mcs/scheduling/meta_test.go +++ b/tests/integrations/mcs/scheduling/meta_test.go @@ -86,7 +86,8 @@ func (suite *metaTestSuite) TestStoreWatch() { ) } - suite.getRaftCluster().RemoveStore(2, false) + re.NoError(failpoint.Enable("github.com/tikv/pd/server/cluster/doNotBuryStore", `return(true)`)) + re.NoError(suite.getRaftCluster().RemoveStore(2, false)) testutil.Eventually(re, func() bool { s := cluster.GetStore(2) if s == nil { @@ -95,6 +96,7 @@ func (suite *metaTestSuite) TestStoreWatch() { return s.GetState() == metapb.StoreState_Offline }) re.Len(cluster.GetStores(), 4) + re.NoError(failpoint.Disable("github.com/tikv/pd/server/cluster/doNotBuryStore")) testutil.Eventually(re, func() bool { return cluster.GetStore(2).GetState() == metapb.StoreState_Tombstone })