Browse code

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 <aaron.lehmann@docker.com>

Aaron Lehmann authored on 2017/04/26 04:10:12
Showing 1 changed files
... ...
@@ -350,9 +350,6 @@ func (s *DockerSwarmSuite) TestAPISwarmRaftQuorum(c *check.C) {
350 350
 
351 351
 	d3.Stop(c)
352 352
 
353
-	// make sure there is a leader
354
-	waitAndAssert(c, defaultReconciliationTimeout, d1.CheckLeader, checker.IsNil)
355
-
356 353
 	var service swarm.Service
357 354
 	simpleTestService(&service)
358 355
 	service.Spec.Name = "top2"