From 4edb73517c417f80a835be0af0be0354d2dce619 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 3 Aug 2016 13:16:01 -0700 Subject: [PATCH 1/4] Remove build 60 steps This test is already covered in the individual graph driver tests and it adds 15s to the test run without adding value. The original idea was to test max number of layers, this is fulfilled by the graph drivers. Signed-off-by: Michael Crosby Upstream-commit: 3ffa5f61494aa67434a9b408540a9efb32e332cf Component: engine --- .../integration-cli/docker_cli_build_test.go | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_build_test.go b/components/engine/integration-cli/docker_cli_build_test.go index bc6d5d3c5e..432309fcab 100644 --- a/components/engine/integration-cli/docker_cli_build_test.go +++ b/components/engine/integration-cli/docker_cli_build_test.go @@ -661,27 +661,6 @@ RUN ls -le /file` } -func (s *DockerSuite) TestBuildSixtySteps(c *check.C) { - testRequires(c, DaemonIsLinux) // TODO Windows: This test passes on Windows, - // but currently adds a disproportionate amount of time for the value it has. - // Removing it from Windows CI for now, but this will be revisited in the - // TP5 timeframe when perf is better. - name := "foobuildsixtysteps" - - ctx, err := fakeContext("FROM "+minimalBaseImage()+"\n"+strings.Repeat("ADD foo /\n", 60), - map[string]string{ - "foo": "test1", - }) - if err != nil { - c.Fatal(err) - } - defer ctx.Close() - - if _, err := buildImageFromContext(name, ctx, true); err != nil { - c.Fatal(err) - } -} - func (s *DockerSuite) TestBuildAddSingleFileToRoot(c *check.C) { testRequires(c, DaemonIsLinux) // Linux specific test name := "testaddimg" From c5d4a2d2e95f0ebdbbfabe63aa75016fa7662cbd Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 3 Aug 2016 13:24:55 -0700 Subject: [PATCH 2/4] Make network stats version test concurrent This change makes the test run go down from 10s to 2s Signed-off-by: Michael Crosby Upstream-commit: 2f3b7f08a09d70bc17a75b00a81e56357a9cae3f Component: engine --- .../integration-cli/docker_api_stats_test.go | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/components/engine/integration-cli/docker_api_stats_test.go b/components/engine/integration-cli/docker_api_stats_test.go index 18fb7d1102..77151d4da7 100644 --- a/components/engine/integration-cli/docker_api_stats_test.go +++ b/components/engine/integration-cli/docker_api_stats_test.go @@ -8,6 +8,7 @@ import ( "runtime" "strconv" "strings" + "sync" "time" "github.com/docker/docker/pkg/integration/checker" @@ -145,18 +146,24 @@ func (s *DockerSuite) TestApiStatsNetworkStatsVersioning(c *check.C) { out, _ := runSleepingContainer(c) id := strings.TrimSpace(out) c.Assert(waitRun(id), checker.IsNil) + wg := sync.WaitGroup{} for i := 17; i <= 21; i++ { - apiVersion := fmt.Sprintf("v1.%d", i) - statsJSONBlob := getVersionedStats(c, id, apiVersion) - if versions.LessThan(apiVersion, "v1.21") { - c.Assert(jsonBlobHasLTv121NetworkStats(statsJSONBlob), checker.Equals, true, - check.Commentf("Stats JSON blob from API %s %#v does not look like a =v1.21 API stats structure", apiVersion, statsJSONBlob)) - } + wg.Add(1) + go func() { + defer wg.Done() + apiVersion := fmt.Sprintf("v1.%d", i) + statsJSONBlob := getVersionedStats(c, id, apiVersion) + if versions.LessThan(apiVersion, "v1.21") { + c.Assert(jsonBlobHasLTv121NetworkStats(statsJSONBlob), checker.Equals, true, + check.Commentf("Stats JSON blob from API %s %#v does not look like a =v1.21 API stats structure", apiVersion, statsJSONBlob)) + } + }() } + wg.Wait() } func getNetworkStats(c *check.C, id string) map[string]types.NetworkStats { From 6cbe7c9c867d42174a95e971e07b632fc1ab3008 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 3 Aug 2016 13:30:34 -0700 Subject: [PATCH 3/4] Change number of pings to 1 This cuts the test time down from 6s to 2s Signed-off-by: Michael Crosby Upstream-commit: cfde8e785582502b830238245ad69eae5394b4f0 Component: engine --- components/engine/integration-cli/docker_api_stats_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/integration-cli/docker_api_stats_test.go b/components/engine/integration-cli/docker_api_stats_test.go index 77151d4da7..93d18f70df 100644 --- a/components/engine/integration-cli/docker_api_stats_test.go +++ b/components/engine/integration-cli/docker_api_stats_test.go @@ -90,7 +90,7 @@ func (s *DockerSuite) TestApiStatsNetworkStats(c *check.C) { // Retrieve the container address contIP := findContainerIP(c, id, "bridge") - numPings := 4 + numPings := 1 var preRxPackets uint64 var preTxPackets uint64 From 82e10dbf883b3a865f829accf40a199c1fa63e3c Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 3 Aug 2016 15:25:27 -0700 Subject: [PATCH 4/4] Decrease sleep to 2 seconds Signed-off-by: Michael Crosby Upstream-commit: 94b1bb82e19242e87edfc688bb3d3c3c010d4603 Component: engine --- components/engine/integration-cli/docker_api_containers_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/integration-cli/docker_api_containers_test.go b/components/engine/integration-cli/docker_api_containers_test.go index 99ea700955..fcb69e591f 100644 --- a/components/engine/integration-cli/docker_api_containers_test.go +++ b/components/engine/integration-cli/docker_api_containers_test.go @@ -874,7 +874,7 @@ func (s *DockerSuite) TestContainerApiWait(c *check.C) { if daemonPlatform == "windows" { sleepCmd = "sleep" } - dockerCmd(c, "run", "--name", name, "busybox", sleepCmd, "5") + dockerCmd(c, "run", "--name", name, "busybox", sleepCmd, "2") status, body, err := sockRequest("POST", "/containers/"+name+"/wait", nil) c.Assert(err, checker.IsNil)