Repository: mesos Updated Branches: refs/heads/master c035e7e87 -> bf4bc6380
Terminated the Slave first before cleaning up its dependencies. This is to ensure that Slave's dependencies do not see any incoming requests to avoid potential race conditions. Typically, an object's dependencies should be cleaned up after the object is cleaned up (reverse of the creation order). Review: https://reviews.apache.org/r/64218 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bf4bc638 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bf4bc638 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bf4bc638 Branch: refs/heads/master Commit: bf4bc6380cb99132736fbbefc85f3a7ca60b032c Parents: c035e7e Author: Jie Yu <[email protected]> Authored: Thu Nov 30 10:12:14 2017 -0800 Committer: Jie Yu <[email protected]> Committed: Thu Nov 30 12:59:45 2017 -0800 ---------------------------------------------------------------------- src/tests/cluster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/bf4bc638/src/tests/cluster.cpp ---------------------------------------------------------------------- diff --git a/src/tests/cluster.cpp b/src/tests/cluster.cpp index 4ff9faf..b530133 100644 --- a/src/tests/cluster.cpp +++ b/src/tests/cluster.cpp @@ -611,6 +611,8 @@ Slave::~Slave() return; } + terminate(); + // This extra closure is necessary in order to use `AWAIT` and `ASSERT_*`, // as these macros require a void return type. [this]() { @@ -638,8 +640,6 @@ Slave::~Slave() ASSERT_TRUE(containers->empty()) << "Failed to destroy containers: " << stringify(containers.get()); }(); - - terminate(); }
