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 2016/04/13 02:48:18 UTC

mesos git commit: Fixed an assumption of direct /tmp access in a slave test.

Repository: mesos
Updated Branches:
  refs/heads/master 0c6d2069f -> bd3ba4e60


Fixed an assumption of direct /tmp access in a slave test.

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


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

Branch: refs/heads/master
Commit: bd3ba4e605ce84ddd902453d22f47178e7f824b2
Parents: 0c6d206
Author: Benjamin Mahler <bm...@apache.org>
Authored: Tue Apr 12 15:19:36 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Apr 12 17:47:58 2016 -0700

----------------------------------------------------------------------
 src/tests/slave_tests.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/bd3ba4e6/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 39ee8d6..7d2e387 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -59,6 +59,7 @@
 #include "slave/containerizer/mesos/containerizer.hpp"
 
 #include "tests/containerizer.hpp"
+#include "tests/environment.hpp"
 #include "tests/flags.hpp"
 #include "tests/limiter.hpp"
 #include "tests/mesos.hpp"
@@ -779,13 +780,16 @@ TEST_F(SlaveTest, LaunchTaskInfoWithContainerInfo)
       "20141010-221431-251662764-60288-12345-0000");
   const ExecutorInfo& executor = slave.getExecutorInfo(frameworkInfo, task);
 
+  Try<string> sandbox = environment->mkdtemp();
+  ASSERT_SOME(sandbox);
+
   SlaveID slaveID;
   slaveID.set_value(UUID::random().toString());
   Future<bool> launch = containerizer->launch(
       containerId,
       task,
       executor,
-      "/tmp",
+      sandbox.get(),
       "test",
       slaveID,
       slave.self(),