Przeglądaj źródła

Merge pull request #37086 from arm64b/some-tweaks-for-CI-tests

Some slight tweaks for the integration test
Anusha Ragunathan 7 lat temu
rodzic
commit
52e22cf986

+ 1 - 1
hack/make.sh

@@ -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}

+ 5 - 4
integration-cli/docker_cli_exec_unix_test.go

@@ -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")

+ 1 - 1
integration/internal/swarm/service.go

@@ -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
 	}
 }