Make TestLogsAPIUntil less flaky

Commit ee594dcb7d 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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2017-12-11 18:28:29 -08:00
parent b687d6379d
commit 1360f0dc9a
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -151,7 +151,7 @@ func (s *DockerSuite) TestLogsAPIUntilFutureFollow(c *check.C) {
func (s *DockerSuite) TestLogsAPIUntil(c *check.C) { func (s *DockerSuite) TestLogsAPIUntil(c *check.C) {
name := "logsuntil" 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() client, err := request.NewClient()
if err != nil { if err != nil {