You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/11/07 18:58:56 UTC

mesos git commit: Fixed `DefaultExecutorTest.*` tests on hosts without Docker.

Repository: mesos
Updated Branches:
  refs/heads/master f37c56f73 -> c7f723bf6


Fixed `DefaultExecutorTest.*` tests on hosts without Docker.

Some of the tests are parameterized by the containerizers.

Fixed the naming schema, so that the tests using the Docker
containerizer run only if Docker is available.

Now the tests with the Mesos containerizer also run if the tests
are started as a non-root user.

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


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

Branch: refs/heads/master
Commit: c7f723bf6217b6594c716dd1d3b5c4719538a882
Parents: f37c56f
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Mon Nov 7 10:43:10 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Nov 7 10:58:07 2016 -0800

----------------------------------------------------------------------
 src/tests/default_executor_tests.cpp | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c7f723bf/src/tests/default_executor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/default_executor_tests.cpp b/src/tests/default_executor_tests.cpp
index db953d3..bb954fc 100644
--- a/src/tests/default_executor_tests.cpp
+++ b/src/tests/default_executor_tests.cpp
@@ -63,14 +63,23 @@ class DefaultExecutorTest
 
 
 // These tests are parameterized by the containerizers enabled on the agent.
+//
+// TODO(gkleiman): The version of gtest currently used by Mesos doesn't support
+// passing `::testing::Values` a single value. Update these calls once we
+// upgrade to a newer version.
+INSTANTIATE_TEST_CASE_P(
+    MesosContainerizer,
+    DefaultExecutorTest,
+    ::testing::ValuesIn(vector<string>({"mesos"})));
+
 INSTANTIATE_TEST_CASE_P(
-    Containterizers,
+    ROOT_DOCKER_DockerAndMesosContainerizers,
     DefaultExecutorTest,
-    ::testing::Values("mesos", "docker,mesos"));
+    ::testing::ValuesIn(vector<string>({"docker,mesos"})));
 
 
 // This test verifies that the default executor can launch a task group.
-TEST_P(DefaultExecutorTest, ROOT_TaskRunning)
+TEST_P(DefaultExecutorTest, TaskRunning)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -212,7 +221,7 @@ TEST_P(DefaultExecutorTest, ROOT_TaskRunning)
 // This test verifies that if the default executor is asked
 // to kill a task from a task group, it kills all tasks in
 // the group and sends TASK_KILLED updates for them.
-TEST_P(DefaultExecutorTest, ROOT_KillTask)
+TEST_P(DefaultExecutorTest, KillTask)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);
@@ -573,7 +582,7 @@ TEST_F(DefaultExecutorTest, KillTaskGroupOnTaskFailure)
 
 // Verifies that a task in a task group with an executor is accepted
 // during `TaskGroupInfo` validation.
-TEST_P(DefaultExecutorTest, ROOT_TaskUsesExecutor)
+TEST_P(DefaultExecutorTest, TaskUsesExecutor)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
   ASSERT_SOME(master);