Skip to content

Commit

Permalink
Merge pull request #20961 from Microsoft/FlakeyTestFix
Browse files Browse the repository at this point in the history
Reenabled TestPsListContainers* tests and increased sleep time
  • Loading branch information
cpuguy83 committed Mar 8, 2016
2 parents 5ded3a2 + ad7398e commit 9e2c4de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 50 deletions.
49 changes: 0 additions & 49 deletions integration-cli/docker_cli_ps_test.go
Expand Up @@ -17,10 +17,6 @@ import (
)

func (s *DockerSuite) TestPsListContainersBase(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}
out, _ := runSleepingContainer(c, "-d")
firstID := strings.TrimSpace(out)

Expand Down Expand Up @@ -123,11 +119,6 @@ func (s *DockerSuite) TestPsListContainersBase(c *check.C) {

// FIXME remove this for 1.12 as --since and --before are deprecated
func (s *DockerSuite) TestPsListContainersDeprecatedSinceAndBefore(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

out, _ := runSleepingContainer(c, "-d")
firstID := strings.TrimSpace(out)

Expand Down Expand Up @@ -223,11 +214,6 @@ func assertContainerList(out string, expected []string) bool {
}

func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// Problematic on Windows as it doesn't report the size correctly @swernli
testRequires(c, DaemonIsLinux)
dockerCmd(c, "run", "-d", "busybox")
Expand Down Expand Up @@ -270,11 +256,6 @@ func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
}

func (s *DockerSuite) TestPsListContainersFilterStatus(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// start exited container
out, _ := dockerCmd(c, "run", "-d", "busybox")
firstID := strings.TrimSpace(out)
Expand Down Expand Up @@ -314,11 +295,6 @@ func (s *DockerSuite) TestPsListContainersFilterStatus(c *check.C) {
}

func (s *DockerSuite) TestPsListContainersFilterID(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// start container
out, _ := dockerCmd(c, "run", "-d", "busybox")
firstID := strings.TrimSpace(out)
Expand All @@ -334,11 +310,6 @@ func (s *DockerSuite) TestPsListContainersFilterID(c *check.C) {
}

func (s *DockerSuite) TestPsListContainersFilterName(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// start container
dockerCmd(c, "run", "--name=a_name_to_match", "busybox")
id, err := getIDByName("a_name_to_match")
Expand All @@ -362,11 +333,6 @@ func (s *DockerSuite) TestPsListContainersFilterName(c *check.C) {
// - Run containers for each of those image (busybox, images_ps_filter_test1, images_ps_filter_test2)
// - Filter them out :P
func (s *DockerSuite) TestPsListContainersFilterAncestorImage(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// Build images
imageName1 := "images_ps_filter_test1"
imageID1, err := buildImage(imageName1,
Expand Down Expand Up @@ -468,11 +434,6 @@ func checkPsAncestorFilterOutput(c *check.C, out string, filterName string, expe
}

func (s *DockerSuite) TestPsListContainersFilterLabel(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// start container
dockerCmd(c, "run", "--name=first", "-l", "match=me", "-l", "second=tag", "busybox")
firstID, err := getIDByName("first")
Expand Down Expand Up @@ -512,11 +473,6 @@ func (s *DockerSuite) TestPsListContainersFilterLabel(c *check.C) {
}

func (s *DockerSuite) TestPsListContainersFilterExited(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

runSleepingContainer(c, "--name=sleep")

dockerCmd(c, "run", "--name", "zero1", "busybox", "true")
Expand Down Expand Up @@ -636,11 +592,6 @@ func (s *DockerSuite) TestPsWithSize(c *check.C) {
}

func (s *DockerSuite) TestPsListContainersFilterCreated(c *check.C) {
// TODO Windows: Figure out why TestPsListContainers* are flakey
if daemonPlatform == "windows" {
c.Skip("Flaky on windowsTP4")
}

// create a container
out, _ := dockerCmd(c, "create", "busybox")
cID := strings.TrimSpace(out)
Expand Down
3 changes: 2 additions & 1 deletion integration-cli/test_vars_windows.go
Expand Up @@ -14,4 +14,5 @@ const (
defaultSleepImage = "busybox"
)

var defaultSleepCommand = []string{"sleep", "60"}
// TODO Windows: In TP5, decrease this sleep time, as performance will be better
var defaultSleepCommand = []string{"sleep", "120"}

0 comments on commit 9e2c4de

Please sign in to comment.