From 2805ff1ecee7cd850a08a00ee9448b54beb4032b Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 21 May 2015 13:02:16 -0400 Subject: [PATCH] Better checking for LogsFollowGoroutinesWithStdout Signed-off-by: Brian Goff --- integration-cli/docker_cli_logs_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_logs_test.go b/integration-cli/docker_cli_logs_test.go index 7747335132..f92dd0e0a1 100644 --- a/integration-cli/docker_cli_logs_test.go +++ b/integration-cli/docker_cli_logs_test.go @@ -436,9 +436,11 @@ func (s *DockerSuite) TestLogsFollowGoroutinesWithStdout(c *check.C) { for { select { case <-t: - c.Assert(nroutines, check.Equals, getNGoroutines()) + if n := getNGoroutines(); n > nroutines { + c.Fatalf("leaked goroutines: expected less than or equal to %d, got: %d", nroutines, n) + } default: - if nroutines == getNGoroutines() { + if n := getNGoroutines(); n <= nroutines { return } time.Sleep(200 * time.Millisecond)