Merge pull request #13387 from cpuguy83/fix_ngroutine_test
Better checking for LogsFollowGoroutinesWithStdout Upstream-commit: 7fffcfff32ce6c4379f3b90a1570847b06d75a8c Component: engine
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user