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

View file

@ -310,7 +310,10 @@ func TestAutopilot_CleanupStaleRaftServer(t *testing.T) {
testrpc.WaitForLeader(t, s1.RPC, "dc1")
// 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
peers, err := s1.numPeers()