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

mesos git commit: Invoked parent class `SetUpTestCase()` from child test fixtures.

Repository: mesos
Updated Branches:
  refs/heads/master 0ca11623e -> dddb328f8


Invoked parent class `SetUpTestCase()` from child test fixtures.

Some of the child test fixtures were missing calls to the
corresponding `SetUpTestCase()` in their parent class. This
can be a problem if the parent test fixture relies on a custom
initialization logic that would never get invoked.

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


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

Branch: refs/heads/master
Commit: dddb328f864dd4265f9cf90996ffe7a1396f18e7
Parents: 0ca1162
Author: Manuwela Kanade <ma...@gmail.com>
Authored: Mon Nov 21 05:26:08 2016 +0800
Committer: Anand Mazumdar <an...@apache.org>
Committed: Mon Nov 21 19:28:09 2016 -0800

----------------------------------------------------------------------
 src/tests/containerizer/memory_pressure_tests.cpp | 2 ++
 src/tests/mesos.cpp                               | 2 ++
 src/tests/module_tests.cpp                        | 2 ++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/dddb328f/src/tests/containerizer/memory_pressure_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/memory_pressure_tests.cpp b/src/tests/containerizer/memory_pressure_tests.cpp
index 42ae323..ff6c2b6 100644
--- a/src/tests/containerizer/memory_pressure_tests.cpp
+++ b/src/tests/containerizer/memory_pressure_tests.cpp
@@ -64,6 +64,8 @@ class MemoryPressureMesosTest : public ContainerizerTest<MesosContainerizer>
 public:
   static void SetUpTestCase()
   {
+    ContainerizerTest<MesosContainerizer>::SetUpTestCase();
+
     // Verify that the dd command and its flags used in a bit are valid
     // on this system.
     ASSERT_EQ(0, os::system("dd count=1 bs=1M if=/dev/zero of=/dev/null"))

http://git-wip-us.apache.org/repos/asf/mesos/blob/dddb328f/src/tests/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index 2aae160..787c9b6 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -596,6 +596,8 @@ slave::Flags ContainerizerTest<slave::MesosContainerizer>::CreateSlaveFlags()
 #ifdef __linux__
 void ContainerizerTest<slave::MesosContainerizer>::SetUpTestCase()
 {
+  MesosTest::SetUpTestCase();
+
   Result<string> user = os::user();
   EXPECT_SOME(user);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/dddb328f/src/tests/module_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module_tests.cpp b/src/tests/module_tests.cpp
index 6e003e5..8443d90 100644
--- a/src/tests/module_tests.cpp
+++ b/src/tests/module_tests.cpp
@@ -58,6 +58,8 @@ protected:
   // per-test teardown.
   static void SetUpTestCase()
   {
+    MesosTest::SetUpTestCase();
+
     EXPECT_SOME(dynamicLibrary.open(
         getModulePath(DEFAULT_MODULE_LIBRARY_NAME)));