From 1360f0dc9a5460bccf7974f7718d031435b883f3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 11 Dec 2017 18:28:29 -0800 Subject: [PATCH] Make TestLogsAPIUntil less flaky Commit ee594dcb7d42f95048c9047d86c61447243db3cd removed the `sleep 0.5` from this test, because sleep has a full-second precision. However, in some cases, all three log-entries are output at the same time, causing the `--until` filter to fail. This patch adds back a `sleep`, but uses 1 second instead. Signed-off-by: Sebastiaan van Stijn --- integration-cli/docker_api_logs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-cli/docker_api_logs_test.go b/integration-cli/docker_api_logs_test.go index 41164df314..ef1e77d88b 100644 --- a/integration-cli/docker_api_logs_test.go +++ b/integration-cli/docker_api_logs_test.go @@ -151,7 +151,7 @@ func (s *DockerSuite) TestLogsAPIUntilFutureFollow(c *check.C) { func (s *DockerSuite) TestLogsAPIUntil(c *check.C) { name := "logsuntil" - dockerCmd(c, "run", "--name", name, "busybox", "/bin/sh", "-c", "for i in $(seq 1 3); do echo log$i; done") + dockerCmd(c, "run", "--name", name, "busybox", "/bin/sh", "-c", "for i in $(seq 1 3); do echo log$i; sleep 1; done") client, err := request.NewClient() if err != nil {