1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #13387 from cpuguy83/fix_ngroutine_test

Better checking for LogsFollowGoroutinesWithStdout
This commit is contained in:
Alexander Morozov 2015-05-21 12:31:57 -07:00
commit 7fffcfff32

View file

@ -414,9 +414,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)