tests: fix autopilot test (#7092)

This commit is contained in:
Hans Hasselberg 2020-01-21 14:09:51 +01:00 committed by GitHub
parent 1e88978aae
commit d52a4e3b82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -310,7 +310,10 @@ func TestAutopilot_CleanupStaleRaftServer(t *testing.T) {
testrpc.WaitForLeader(t, s1.RPC, "dc1") testrpc.WaitForLeader(t, s1.RPC, "dc1")
// Add s4 to peers directly // Add s4 to peers directly
s1.raft.AddVoter(raft.ServerID(s4.config.NodeID), raft.ServerAddress(joinAddrLAN(s4)), 0, 0) addVoterFuture := s1.raft.AddVoter(raft.ServerID(s4.config.NodeID), raft.ServerAddress(joinAddrLAN(s4)), 0, 0)
if err := addVoterFuture.Error(); err != nil {
t.Fatal(err)
}
// Verify we have 4 peers // Verify we have 4 peers
peers, err := s1.numPeers() peers, err := s1.numPeers()