Skip to content

Commit

Permalink
integration: call waitLeader() before sending requests in TestIssue2746
Browse files Browse the repository at this point in the history
Because of leader absence, TestIssue2746 fails occasionally. For
fixing the problem, this commit lets the test call waitLeader() before
sending requests.

The test failure is fixed partially. It is because the campaign can
happen during testing (not initialization phase). For handling it,
we would need to let clients retry the request.

Partially fixes etcd-io#5022
  • Loading branch information
mitake committed May 19, 2016
1 parent 62b4d1c commit f13eaac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions integration/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ func testIssue2746(t *testing.T, members int) {
}

c.Launch(t)
c.waitLeader(t, c.Members)
defer c.Terminate(t)

// force a snapshot
Expand Down

0 comments on commit f13eaac

Please sign in to comment.