From 51f289d8732092de9c56f11db209584e85f6e4e1 Mon Sep 17 00:00:00 2001 From: okJiang <819421878@qq.com> Date: Wed, 16 Oct 2024 18:04:51 +0800 Subject: [PATCH] make TestStoreWatch stable Signed-off-by: okJiang <819421878@qq.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 })