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:
parent
8974fd47c7
commit
476d7872ef
3 changed files with 7 additions and 6 deletions
|
@ -159,7 +159,7 @@ ORIG_BUILDFLAGS+=( $REBUILD_FLAG )
|
||||||
BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" )
|
BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" )
|
||||||
|
|
||||||
# Test timeout.
|
# Test timeout.
|
||||||
if [ "${DOCKER_ENGINE_GOARCH}" == "arm" ]; then
|
if [ "${DOCKER_ENGINE_GOARCH}" == "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" == "arm" ]; then
|
||||||
: ${TIMEOUT:=10m}
|
: ${TIMEOUT:=10m}
|
||||||
elif [ "${DOCKER_ENGINE_GOARCH}" == "windows" ]; then
|
elif [ "${DOCKER_ENGINE_GOARCH}" == "windows" ]; then
|
||||||
: ${TIMEOUT:=8m}
|
: ${TIMEOUT:=8m}
|
||||||
|
|
|
@ -25,7 +25,10 @@ func (s *DockerSuite) TestExecInteractiveStdinClose(c *check.C) {
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
b := bytes.NewBuffer(nil)
|
b := bytes.NewBuffer(nil)
|
||||||
go io.Copy(b, p)
|
go func() {
|
||||||
|
io.Copy(b, p)
|
||||||
|
p.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
ch := make(chan error)
|
ch := make(chan error)
|
||||||
go func() { ch <- cmd.Wait() }()
|
go func() { ch <- cmd.Wait() }()
|
||||||
|
@ -33,9 +36,7 @@ func (s *DockerSuite) TestExecInteractiveStdinClose(c *check.C) {
|
||||||
select {
|
select {
|
||||||
case err := <-ch:
|
case err := <-ch:
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
bs := b.Bytes()
|
output := b.String()
|
||||||
bs = bytes.Trim(bs, "\x00")
|
|
||||||
output := string(bs[:])
|
|
||||||
c.Assert(strings.TrimSpace(output), checker.Equals, "hello")
|
c.Assert(strings.TrimSpace(output), checker.Equals, "hello")
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
c.Fatal("timed out running docker exec")
|
c.Fatal("timed out running docker exec")
|
||||||
|
|
|
@ -22,7 +22,7 @@ func ServicePoll(config *poll.Settings) {
|
||||||
config.Timeout = 30 * time.Second
|
config.Timeout = 30 * time.Second
|
||||||
config.Delay = 100 * time.Millisecond
|
config.Delay = 100 * time.Millisecond
|
||||||
if runtime.GOARCH == "arm64" || runtime.GOARCH == "arm" {
|
if runtime.GOARCH == "arm64" || runtime.GOARCH == "arm" {
|
||||||
config.Timeout = 1 * time.Minute
|
config.Timeout = 90 * time.Second
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue