Jelajahi Sumber

Merge pull request #18134 from hypriot/17802-fix-integration-tests-for-arm

Increase timeouts to fix integration-cli tests on ARM
Michael Crosby 9 tahun lalu
induk
melakukan
048280ca42

+ 2 - 2
integration-cli/docker_cli_build_test.go

@@ -759,7 +759,7 @@ ADD test_file .`,
 		close(errChan)
 		close(errChan)
 	}()
 	}()
 	select {
 	select {
-	case <-time.After(5 * time.Second):
+	case <-time.After(15 * time.Second):
 		c.Fatal("Build with adding to workdir timed out")
 		c.Fatal("Build with adding to workdir timed out")
 	case err := <-errChan:
 	case err := <-errChan:
 		c.Assert(err, check.IsNil)
 		c.Assert(err, check.IsNil)
@@ -1408,7 +1408,7 @@ COPY test_file .`,
 		close(errChan)
 		close(errChan)
 	}()
 	}()
 	select {
 	select {
-	case <-time.After(5 * time.Second):
+	case <-time.After(15 * time.Second):
 		c.Fatal("Build with adding to workdir timed out")
 		c.Fatal("Build with adding to workdir timed out")
 	case err := <-errChan:
 	case err := <-errChan:
 		c.Assert(err, check.IsNil)
 		c.Assert(err, check.IsNil)

+ 1 - 1
integration-cli/docker_cli_events_test.go

@@ -53,7 +53,7 @@ func (s *DockerSuite) TestEventsUntag(c *check.C) {
 	dockerCmd(c, "rmi", "utest:tag1")
 	dockerCmd(c, "rmi", "utest:tag1")
 	dockerCmd(c, "rmi", "utest:tag2")
 	dockerCmd(c, "rmi", "utest:tag2")
 	eventsCmd := exec.Command(dockerBinary, "events", "--since=1")
 	eventsCmd := exec.Command(dockerBinary, "events", "--since=1")
-	out, exitCode, _, err := runCommandWithOutputForDuration(eventsCmd, time.Duration(time.Millisecond*500))
+	out, exitCode, _, err := runCommandWithOutputForDuration(eventsCmd, time.Duration(time.Millisecond*2500))
 	c.Assert(err, checker.IsNil)
 	c.Assert(err, checker.IsNil)
 	c.Assert(exitCode, checker.Equals, 0, check.Commentf("Failed to get events"))
 	c.Assert(exitCode, checker.Equals, 0, check.Commentf("Failed to get events"))
 	events := strings.Split(out, "\n")
 	events := strings.Split(out, "\n")

+ 1 - 1
integration-cli/docker_cli_exec_unix_test.go

@@ -35,7 +35,7 @@ func (s *DockerSuite) TestExecInteractiveStdinClose(c *check.C) {
 		c.Assert(err, checker.IsNil)
 		c.Assert(err, checker.IsNil)
 		output := b.String()
 		output := b.String()
 		c.Assert(strings.TrimSpace(output), checker.Equals, "hello")
 		c.Assert(strings.TrimSpace(output), checker.Equals, "hello")
-	case <-time.After(1 * time.Second):
+	case <-time.After(5 * time.Second):
 		c.Fatal("timed out running docker exec")
 		c.Fatal("timed out running docker exec")
 	}
 	}
 }
 }

+ 1 - 1
integration-cli/docker_cli_start_test.go

@@ -33,7 +33,7 @@ func (s *DockerSuite) TestStartAttachReturnsOnError(c *check.C) {
 	select {
 	select {
 	case err := <-ch:
 	case err := <-ch:
 		c.Assert(err, check.IsNil)
 		c.Assert(err, check.IsNil)
-	case <-time.After(time.Second):
+	case <-time.After(5 * time.Second):
 		c.Fatalf("Attach did not exit properly")
 		c.Fatalf("Attach did not exit properly")
 	}
 	}
 }
 }

+ 1 - 1
integration-cli/docker_utils.go

@@ -1517,7 +1517,7 @@ func setupRegistry(c *check.C) *testRegistryV2 {
 	c.Assert(err, check.IsNil)
 	c.Assert(err, check.IsNil)
 
 
 	// Wait for registry to be ready to serve requests.
 	// Wait for registry to be ready to serve requests.
-	for i := 0; i != 5; i++ {
+	for i := 0; i != 50; i++ {
 		if err = reg.Ping(); err == nil {
 		if err = reg.Ping(); err == nil {
 			break
 			break
 		}
 		}