You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2016/02/01 01:42:03 UTC

mesos git commit: Made sure the container launcher terminated before we leave the test.

Repository: mesos
Updated Branches:
  refs/heads/master 7e04739bd -> e29ea6a92


Made sure the container launcher terminated before we leave the test.

Waiting for the launch result is not enough as it is unrelated to
whether the launched container has terminated. If we do not wait for
that the global teardown might find it still running and fail the tests
(this can happen if we e.g., execute this test in isolation).

Also aline the name of the launch result to follow the canonical
scheme.

Review: https://reviews.apache.org/r/42247/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e29ea6a9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e29ea6a9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e29ea6a9

Branch: refs/heads/master
Commit: e29ea6a9215ca0bc2405b85a197ee81740707bb8
Parents: 7e04739
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Mon Feb 1 00:59:25 2016 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Mon Feb 1 00:59:25 2016 +0100

----------------------------------------------------------------------
 src/tests/slave_tests.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e29ea6a9/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index e943ab9..ede2df0 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -682,10 +682,9 @@ TEST_F(SlaveTest, LaunchTaskInfoWithContainerInfo)
       "20141010-221431-251662764-60288-12345-0000");
   const ExecutorInfo& executor = slave.getExecutorInfo(frameworkInfo, task);
 
-  Future<bool> result;
   SlaveID slaveID;
   slaveID.set_value(UUID::random().toString());
-  result = containerizer.get()->launch(
+  Future<bool> launch = containerizer.get()->launch(
       containerId,
       task,
       executor,
@@ -694,13 +693,17 @@ TEST_F(SlaveTest, LaunchTaskInfoWithContainerInfo)
       slaveID,
       slave.self(),
       false);
-  AWAIT_READY(result);
+  AWAIT_READY(launch);
 
   // TODO(spikecurtis): With agent capabilities (MESOS-3362), the
   // Containerizer should fail this request since none of the listed
   // isolators can handle NetworkInfo, which implies
   // IP-per-container.
-  EXPECT_TRUE(result.get());
+  EXPECT_TRUE(launch.get());
+
+  // Wait for the container to terminate before shutting down.
+  AWAIT_READY(containerizer.get()->wait(containerId));
+
   Shutdown(); // Must shutdown before 'containerizer' gets deallocated.
 }