Do not rely on "live" event anymore

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 64483c3bdaa1887b8b932e0564362fbbff025dc0
Component: engine
This commit is contained in:
Kenfe-Mickael Laventure
2016-07-19 08:24:39 -07:00
parent 7262ef8faa
commit 32ecbd59e9
4 changed files with 137 additions and 64 deletions
@@ -7,7 +7,7 @@ import (
"os/exec"
"path/filepath"
"strings"
"time"
"syscall"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
@@ -129,7 +129,11 @@ func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
c.Fatalf("Could not kill daemon: %v", err)
}
time.Sleep(5 * time.Second)
for {
if err := syscall.Kill(s.d.cmd.Process.Pid, 0); err == syscall.ESRCH {
break
}
}
cmd := exec.Command("pgrep", "-f", "plugin-no-remove")
if out, ec, err := runCommandWithOutput(cmd); ec != 1 {