Better checking for LogsFollowGoroutinesWithStdout
| ... | ... |
@@ -414,9 +414,11 @@ func (s *DockerSuite) TestLogsFollowGoroutinesWithStdout(c *check.C) {
|
| 414 | 414 |
for {
|
| 415 | 415 |
select {
|
| 416 | 416 |
case <-t: |
| 417 |
- c.Assert(nroutines, check.Equals, getNGoroutines()) |
|
| 417 |
+ if n := getNGoroutines(); n > nroutines {
|
|
| 418 |
+ c.Fatalf("leaked goroutines: expected less than or equal to %d, got: %d", nroutines, n)
|
|
| 419 |
+ } |
|
| 418 | 420 |
default: |
| 419 |
- if nroutines == getNGoroutines() {
|
|
| 421 |
+ if n := getNGoroutines(); n <= nroutines {
|
|
| 420 | 422 |
return |
| 421 | 423 |
} |
| 422 | 424 |
time.Sleep(200 * time.Millisecond) |