You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2014/06/11 23:17:35 UTC
git commit: Fixed child process leaks in SlaveRecoveryTest.GCExecutor.
Repository: mesos
Updated Branches:
refs/heads/master 5d9d3d784 -> 59be26641
Fixed child process leaks in SlaveRecoveryTest.GCExecutor.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/59be2664
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/59be2664
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/59be2664
Branch: refs/heads/master
Commit: 59be2664152fc165562e59980c7a3f0e9e7e436f
Parents: 5d9d3d7
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Wed Jun 11 13:58:10 2014 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Wed Jun 11 13:58:10 2014 -0700
----------------------------------------------------------------------
src/tests/slave_recovery_tests.cpp | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/59be2664/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 44ffac4..e654ed0 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -1546,11 +1546,20 @@ TYPED_TEST(SlaveRecoveryTest, GCExecutor)
AWAIT_READY(status);
this->Stop(slave.get());
- delete containerizer1.get();
- // Shut down the executor manually so that it doesn't hang around
- // after the test finishes.
- process::post(executorPid, ShutdownExecutorMessage());
+ // Destroy all the containers before we destroy the containerizer.
+ Future<hashset<ContainerID> > containers = containerizer1.get()->containers();
+ AWAIT_READY(containers);
+
+ foreach (const ContainerID& containerId, containers.get()) {
+ Future<containerizer::Termination> wait =
+ containerizer1.get()->wait(containerId);
+
+ containerizer1.get()->destroy(containerId);
+ AWAIT_READY(wait);
+ }
+
+ delete containerizer1.get();
// Remove the symlink "latest" in the executor directory
// to simulate a non-recoverable executor.