Browse Source

Better checking for LogsFollowGoroutinesWithStdout

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Brian Goff 10 years ago
parent
commit
2805ff1ece
1 changed files with 4 additions and 2 deletions
  1. 4 2
      integration-cli/docker_cli_logs_test.go

+ 4 - 2
integration-cli/docker_cli_logs_test.go

@@ -436,9 +436,11 @@ func (s *DockerSuite) TestLogsFollowGoroutinesWithStdout(c *check.C) {
 	for {
 	for {
 		select {
 		select {
 		case <-t:
 		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:
 		default:
-			if nroutines == getNGoroutines() {
+			if n := getNGoroutines(); n <= nroutines {
 				return
 				return
 			}
 			}
 			time.Sleep(200 * time.Millisecond)
 			time.Sleep(200 * time.Millisecond)