Skip to content

Commit

Permalink
make TestStoreWatch stable
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed Oct 16, 2024
1 parent 48db925 commit 51f289d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/integrations/mcs/scheduling/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
})
Expand Down

0 comments on commit 51f289d

Please sign in to comment.