|
@@ -239,6 +239,8 @@ func (s *DockerSuite) TestLogsFollowSlowStdoutConsumer(c *check.C) {
|
|
bytes2, err := ConsumeWithSpeed(stdout, 32*1024, 0, nil)
|
|
bytes2, err := ConsumeWithSpeed(stdout, 32*1024, 0, nil)
|
|
c.Assert(err, checker.IsNil)
|
|
c.Assert(err, checker.IsNil)
|
|
|
|
|
|
|
|
+ c.Assert(logCmd.Wait(), checker.IsNil)
|
|
|
|
+
|
|
actual := bytes1 + bytes2
|
|
actual := bytes1 + bytes2
|
|
c.Assert(actual, checker.Equals, expected)
|
|
c.Assert(actual, checker.Equals, expected)
|
|
}
|
|
}
|
|
@@ -288,6 +290,7 @@ func (s *DockerSuite) TestLogsFollowGoroutinesWithStdout(c *check.C) {
|
|
c.Assert(<-chErr, checker.IsNil)
|
|
c.Assert(<-chErr, checker.IsNil)
|
|
c.Assert(cmd.Process.Kill(), checker.IsNil)
|
|
c.Assert(cmd.Process.Kill(), checker.IsNil)
|
|
r.Close()
|
|
r.Close()
|
|
|
|
+ cmd.Wait()
|
|
// NGoroutines is not updated right away, so we need to wait before failing
|
|
// NGoroutines is not updated right away, so we need to wait before failing
|
|
c.Assert(waitForGoroutines(nroutines), checker.IsNil)
|
|
c.Assert(waitForGoroutines(nroutines), checker.IsNil)
|
|
}
|
|
}
|
|
@@ -303,6 +306,7 @@ func (s *DockerSuite) TestLogsFollowGoroutinesNoOutput(c *check.C) {
|
|
c.Assert(cmd.Start(), checker.IsNil)
|
|
c.Assert(cmd.Start(), checker.IsNil)
|
|
time.Sleep(200 * time.Millisecond)
|
|
time.Sleep(200 * time.Millisecond)
|
|
c.Assert(cmd.Process.Kill(), checker.IsNil)
|
|
c.Assert(cmd.Process.Kill(), checker.IsNil)
|
|
|
|
+ cmd.Wait()
|
|
|
|
|
|
// NGoroutines is not updated right away, so we need to wait before failing
|
|
// NGoroutines is not updated right away, so we need to wait before failing
|
|
c.Assert(waitForGoroutines(nroutines), checker.IsNil)
|
|
c.Assert(waitForGoroutines(nroutines), checker.IsNil)
|