From d52a4e3b82400882c35d774d5e3358ef8d76b818 Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Tue, 21 Jan 2020 14:09:51 +0100 Subject: [PATCH] tests: fix autopilot test (#7092) --- agent/consul/autopilot_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agent/consul/autopilot_test.go b/agent/consul/autopilot_test.go index f8efb9820..b0901405d 100644 --- a/agent/consul/autopilot_test.go +++ b/agent/consul/autopilot_test.go @@ -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()