瀏覽代碼

TestCleanupMountsAfterGracefulShutdown wait for daemon exit

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Brian Goff 9 年之前
父節點
當前提交
9c52b11e2a
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      integration-cli/docker_cli_daemon_test.go

+ 2 - 3
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))