Browse code

TestCleanupMountsAfterGracefulShutdown wait for daemon exit

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2016/06/15 05:41:29
Showing 1 changed files
... ...
@@ -1587,9 +1587,8 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterGracefulShutdown(c *check.C) {
1587 1587
 
1588 1588
 	// Send SIGINT and daemon should clean up
1589 1589
 	c.Assert(s.d.cmd.Process.Signal(os.Interrupt), check.IsNil)
1590
-
1591
-	// Wait a bit for the daemon to handle cleanups.
1592
-	time.Sleep(3 * time.Second)
1590
+	// Wait for the daemon to stop.
1591
+	c.Assert(<-s.d.wait, checker.IsNil)
1593 1592
 
1594 1593
 	mountOut, err := ioutil.ReadFile("/proc/self/mountinfo")
1595 1594
 	c.Assert(err, check.IsNil, check.Commentf("Output: %s", mountOut))