Better logging for errors in some tests
Signed-off-by: Brian Goff <cpuguy83@gmail.com> Upstream-commit: 42df9edc4a6ccfff6869fd14b2128ca3312e99db Component: engine
This commit is contained in:
@ -35,10 +35,12 @@ func (s *DockerSuite) TestWaitBlockedExitZero(c *check.C) {
|
||||
|
||||
chWait := make(chan string)
|
||||
go func() {
|
||||
chWait <- ""
|
||||
out, _, _ := runCommandWithOutput(exec.Command(dockerBinary, "wait", containerID))
|
||||
chWait <- out
|
||||
}()
|
||||
|
||||
<-chWait // make sure the goroutine is started
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
dockerCmd(c, "stop", containerID)
|
||||
|
||||
@ -84,7 +86,7 @@ func (s *DockerSuite) TestWaitBlockedExitRandom(c *check.C) {
|
||||
|
||||
select {
|
||||
case err := <-chWait:
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(err, checker.IsNil, check.Commentf(waitCmdOut.String()))
|
||||
status, err := waitCmdOut.ReadString('\n')
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(strings.TrimSpace(status), checker.Equals, "99", check.Commentf("expected exit 99, got %s", status))
|
||||
|
||||
Reference in New Issue
Block a user