Skip to content

Commit

Permalink
Zombie processes integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
vfarcic committed Sep 14, 2017
1 parent 554cf44 commit 0ff9768
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions integration_tests/integration_swarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,28 +178,27 @@ func (s IntegrationSwarmTestSuite) Test_Compression() {
}
}

// The attempt to remove zombie processes failed
//func (s IntegrationSwarmTestSuite) Test_ZombieProcesses() {
// for i:=0; i < 30; i++ {
// s.reconfigureGoDemo("")
// }
// out, err := exec.Command(
// "/bin/sh",
// "-c",
// "docker container ls -q -f \"label=com.docker.swarm.service.name=proxy\" | tail -n 1",
// ).CombinedOutput()
// s.NoError(err)
// out, err = exec.Command(
// "/bin/sh",
// "-c",
// "docker container exec -t " + strings.Trim(string(out), "\n") + " ps aux | grep haproxy",
// ).CombinedOutput()
// time.Sleep(10 * time.Second)
//
// s.NoError(err)
// // There should be only one processes plus extra line at the end of the output
// s.Len(strings.Split(string(out), "\n"), 2)
//}
func (s IntegrationSwarmTestSuite) Test_ZombieProcesses() {
for i:=0; i < 30; i++ {
s.reconfigureGoDemo("")
}
out, err := exec.Command(
"/bin/sh",
"-c",
"docker container ls -q -f \"label=com.docker.swarm.service.name=proxy\" | tail -n 1",
).CombinedOutput()
s.NoError(err)
out, err = exec.Command(
"/bin/sh",
"-c",
"docker container exec -t " + strings.Trim(string(out), "\n") + " ps aux | grep haproxy",
).CombinedOutput()
time.Sleep(10 * time.Second)

s.NoError(err)
// There should be only one processes plus extra line at the end of the output
s.Len(strings.Split(string(out), "\n"), 2)
}

func (s IntegrationSwarmTestSuite) Test_HeaderAcls() {
client := new(http.Client)
Expand Down

0 comments on commit 0ff9768

Please sign in to comment.