Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Jun 3, 2024
1 parent 3ae952f commit 2af142b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integrations/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,7 @@ func (suite *clientTestSuite) TestScanRegions() {
})

// Set leader of region3 to nil.
regions[3].Leader = nil
region3 := core.NewRegionInfo(regions[3])
suite.srv.GetRaftCluster().HandleRegionHeartbeat(region3)

Expand All @@ -1439,6 +1440,9 @@ func (suite *clientTestSuite) TestScanRegions() {
t.Log("scanRegions", scanRegions)
t.Log("expect", expect)
for i := range expect {
if scanRegions[i].Meta.GetId() != region3.GetID() {
expect[i].Leader = expect[i].Peers[0]
}
re.Equal(expect[i], scanRegions[i].Meta)

if scanRegions[i].Meta.GetId() == region3.GetID() {
Expand Down

0 comments on commit 2af142b

Please sign in to comment.