From 9c52b11e2a92a2c5f78d18ae95ba8d79b149d9e2 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Tue, 14 Jun 2016 16:41:29 -0400 Subject: [PATCH] TestCleanupMountsAfterGracefulShutdown wait for daemon exit Signed-off-by: Brian Goff --- integration-cli/docker_cli_daemon_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index 363bca3073..ac3fe75c28 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -1587,9 +1587,8 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterGracefulShutdown(c *check.C) { // Send SIGINT and daemon should clean up c.Assert(s.d.cmd.Process.Signal(os.Interrupt), check.IsNil) - - // Wait a bit for the daemon to handle cleanups. - time.Sleep(3 * time.Second) + // Wait for the daemon to stop. + c.Assert(<-s.d.wait, checker.IsNil) mountOut, err := ioutil.ReadFile("/proc/self/mountinfo") c.Assert(err, check.IsNil, check.Commentf("Output: %s", mountOut))