فهرست منبع

Fix flaky TestSwarmNodeTaskListFilter by waiting for task fully deployed

This is an attempt to fix the flaky test of TestSwarmNodeTaskListFilter in 25029.

Basically this fix adds a check to wait until 3 containers has already up,
before processing `node tasks ...`.

This might fix 25029.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 63c0366bc9a7f326ad61cdfa69fa860cf844a2c7)
Signed-off-by: Tibor Vass <tibor@docker.com>
Yong Tang 9 سال پیش
والد
کامیت
af0f7ad792
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      integration-cli/docker_cli_swarm_test.go

+ 3 - 0
integration-cli/docker_cli_swarm_test.go

@@ -177,6 +177,9 @@ func (s *DockerSwarmSuite) TestSwarmNodeTaskListFilter(c *check.C) {
 	c.Assert(err, checker.IsNil)
 	c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
 
+	// make sure task has been deployed.
+	waitAndAssert(c, defaultReconciliationTimeout, d.checkActiveContainerCount, checker.Equals, 3)
+
 	filter := "name=redis-cluster"
 
 	out, err = d.Cmd("node", "ps", "--filter", filter, "self")