Browse code

Better checking for LogsFollowGoroutinesWithStdout

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2015/05/22 02:02:16
Showing 1 changed files
... ...
@@ -436,9 +436,11 @@ func (s *DockerSuite) TestLogsFollowGoroutinesWithStdout(c *check.C) {
436 436
 	for {
437 437
 		select {
438 438
 		case <-t:
439
-			c.Assert(nroutines, check.Equals, getNGoroutines())
439
+			if n := getNGoroutines(); n > nroutines {
440
+				c.Fatalf("leaked goroutines: expected less than or equal to %d, got: %d", nroutines, n)
441
+			}
440 442
 		default:
441
-			if nroutines == getNGoroutines() {
443
+			if n := getNGoroutines(); n <= nroutines {
442 444
 				return
443 445
 			}
444 446
 			time.Sleep(200 * time.Millisecond)