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

Some slight tweaks for the integration test

`arm64` needs get more time duration for the test to finish.

`pty.Start()` opens a file, so the caller should close it explicitly,
else the file I/O can result in unexpected data synchronization issue.

All those changes will not affect the test itself.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
This commit is contained in:
Dennis Chen 2018-05-17 15:42:42 +08:00
parent 8974fd47c7
commit 476d7872ef
3 changed files with 7 additions and 6 deletions

View file

@ -159,7 +159,7 @@ ORIG_BUILDFLAGS+=( $REBUILD_FLAG )
BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" )
# Test timeout.
if [ "${DOCKER_ENGINE_GOARCH}" == "arm" ]; then
if [ "${DOCKER_ENGINE_GOARCH}" == "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" == "arm" ]; then
: ${TIMEOUT:=10m}
elif [ "${DOCKER_ENGINE_GOARCH}" == "windows" ]; then
: ${TIMEOUT:=8m}

View file

@ -25,7 +25,10 @@ func (s *DockerSuite) TestExecInteractiveStdinClose(c *check.C) {
c.Assert(err, checker.IsNil)
b := bytes.NewBuffer(nil)
go io.Copy(b, p)
go func() {
io.Copy(b, p)
p.Close()
}()
ch := make(chan error)
go func() { ch <- cmd.Wait() }()
@ -33,9 +36,7 @@ func (s *DockerSuite) TestExecInteractiveStdinClose(c *check.C) {
select {
case err := <-ch:
c.Assert(err, checker.IsNil)
bs := b.Bytes()
bs = bytes.Trim(bs, "\x00")
output := string(bs[:])
output := b.String()
c.Assert(strings.TrimSpace(output), checker.Equals, "hello")
case <-time.After(5 * time.Second):
c.Fatal("timed out running docker exec")

View file

@ -22,7 +22,7 @@ func ServicePoll(config *poll.Settings) {
config.Timeout = 30 * time.Second
config.Delay = 100 * time.Millisecond
if runtime.GOARCH == "arm64" || runtime.GOARCH == "arm" {
config.Timeout = 1 * time.Minute
config.Timeout = 90 * time.Second
}
}