Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: fix test suite race #6784

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix test suite race
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Jul 11, 2023
commit cbade8adace64c2103207d6dd14ef391f59ccdcf
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