Skip to content

Commit

Permalink
s2 should see its status as alive after fixing issue #18
Browse files Browse the repository at this point in the history
  • Loading branch information
mbver committed Aug 20, 2024
1 parent af974b8 commit 4bcd5a5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions serf/serf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1699,17 +1699,17 @@ func TestSerf_joinLeaveJoin(t *testing.T) {
r.Fatalf("s2 members: %d", s2.NumNodes())
}

// s1 should see the node as alive
mems := s1.Members()
anyLeft := false
// s2 should see the itself as alive
mems := s2.Members()
anyLeaving := false
for _, m := range mems {
if m.Status == StatusLeft {
anyLeft = true
if m.Status == StatusLeaving {
anyLeaving = true
break
}
}
if anyLeft {
r.Fatalf("all nodes should be alive!")
if anyLeaving {
t.Fatalf("all nodes should be alive!")
}
})
}
Expand Down

0 comments on commit 4bcd5a5

Please sign in to comment.