Skip to content

Commit

Permalink
*: fix test suite race (tikv#6784)
Browse files Browse the repository at this point in the history
close tikv#6772

Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx authored Jul 11, 2023
1 parent 3cce629 commit f816c51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,11 @@ func (c *TestCluster) WaitLeader(ops ...WaitOption) string {
counter := make(map[string]int)
running := 0
for _, s := range c.servers {
s.RLock()
if s.state == Running {
running++
}
s.RUnlock()
n := s.GetLeader().GetName()
if n != "" {
counter[n]++
Expand Down

0 comments on commit f816c51

Please sign in to comment.