mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6320 from xiang90/fixTestIssue3699
integration: fix live lock in issue3699
This commit is contained in:
@@ -318,6 +318,10 @@ func TestIssue3699(t *testing.T) {
|
||||
for leaderID != 3 {
|
||||
c.Members[leaderID].Stop(t)
|
||||
<-c.Members[leaderID].s.StopNotify()
|
||||
// do not restart the killed member immediately.
|
||||
// the member will advance its election timeout after restart,
|
||||
// so it will have a better chance to become the leader again.
|
||||
time.Sleep(time.Duration(electionTicks * int(tickDuration)))
|
||||
c.Members[leaderID].Restart(t)
|
||||
leaderID = c.waitLeader(t, c.Members)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user