Merge pull request #37076 from arm64b/TestExecInteractiveStdinClose
Fix flaky test case of `TestExecInteractiveStdinClose` Upstream-commit: b7b6b6929c6436145bd12e6fef7efb7d01fa170b Component: engine
This commit is contained in:
@@ -33,7 +33,9 @@ func (s *DockerSuite) TestExecInteractiveStdinClose(c *check.C) {
|
||||
select {
|
||||
case err := <-ch:
|
||||
c.Assert(err, checker.IsNil)
|
||||
output := b.String()
|
||||
bs := b.Bytes()
|
||||
bs = bytes.Trim(bs, "\x00")
|
||||
output := string(bs[:])
|
||||
c.Assert(strings.TrimSpace(output), checker.Equals, "hello")
|
||||
case <-time.After(5 * time.Second):
|
||||
c.Fatal("timed out running docker exec")
|
||||
|
||||
Reference in New Issue
Block a user