From e245f3021a3c4c1c9638ce549d580ce72f9932be Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Tue, 25 Apr 2017 12:10:12 -0700 Subject: [PATCH] Fix incorrect assumption in TestAPISwarmRaftQuorum This test shuts down two out of three managers and then asserts that the swarm has a leader. A swarm that lost quorum won't necessarily have a leader, and in this case only has one because the old leader is still around. Soon SwarmKit will be changed so the leader gives up leadership when quorum is lost. This will avoid confusing situations, like read-only APIs succeeding, while ones that write to Raft hang. Signed-off-by: Aaron Lehmann Upstream-commit: c27603238c5493909ec9b657b342b67b23e615e3 Component: engine --- components/engine/integration-cli/docker_api_swarm_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/engine/integration-cli/docker_api_swarm_test.go b/components/engine/integration-cli/docker_api_swarm_test.go index 7b131000c7..a698b8ba10 100644 --- a/components/engine/integration-cli/docker_api_swarm_test.go +++ b/components/engine/integration-cli/docker_api_swarm_test.go @@ -350,9 +350,6 @@ func (s *DockerSwarmSuite) TestAPISwarmRaftQuorum(c *check.C) { d3.Stop(c) - // make sure there is a leader - waitAndAssert(c, defaultReconciliationTimeout, d1.CheckLeader, checker.IsNil) - var service swarm.Service simpleTestService(&service) service.Spec.Name = "top2"