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 2015/11/30 21:28:40 UTC

[1/2] mesos git commit: Added calls to parent teardown methods in child teardown methods.

Repository: mesos
Updated Branches:
  refs/heads/master ed8f3c05e -> 09ab18da1


Added calls to parent teardown methods in child teardown methods.

Review: https://reviews.apache.org/api/review-requests/40454/


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

Branch: refs/heads/master
Commit: 09ab18da1f3f649c3f634f9e4a878ac90ebddcd3
Parents: c481a4d
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Mon Nov 30 21:05:20 2015 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Mon Nov 30 21:27:49 2015 +0100

----------------------------------------------------------------------
 src/tests/containerizer/provisioner_docker_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/09ab18da/src/tests/containerizer/provisioner_docker_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/provisioner_docker_tests.cpp b/src/tests/containerizer/provisioner_docker_tests.cpp
index b98461e..c63bf53 100644
--- a/src/tests/containerizer/provisioner_docker_tests.cpp
+++ b/src/tests/containerizer/provisioner_docker_tests.cpp
@@ -532,6 +532,8 @@ protected:
 
   static void TearDownTestCase()
   {
+    SSLTest::TearDownTestCase();
+
     os::rmdir(RegistryClientTest::OUTPUT_DIR);
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/09ab18da/src/tests/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index a75182e..3e2319a 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -801,6 +801,8 @@ void ContainerizerTest<slave::MesosContainerizer>::SetUpTestCase()
 
 void ContainerizerTest<slave::MesosContainerizer>::TearDownTestCase()
 {
+  MesosTest::TearDownTestCase();
+
   Result<string> user = os::user();
   EXPECT_SOME(user);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/09ab18da/src/tests/module_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module_tests.cpp b/src/tests/module_tests.cpp
index b5cfbcd..a3271a3 100644
--- a/src/tests/module_tests.cpp
+++ b/src/tests/module_tests.cpp
@@ -80,6 +80,8 @@ protected:
 
   static void TearDownTestCase()
   {
+    MesosTest::TearDownTestCase();
+
     // Close the module library.
     dynamicLibrary.close();
 


[2/2] mesos git commit: Add a TearDownTestCase method for cleaning up after tests that reinitialize SSL configuration.

Posted by ti...@apache.org.
Add a TearDownTestCase method for cleaning up after tests that reinitialize SSL configuration.

Tests that reinitialize SSL configuration only change environment
variables upon setup but leave it mutated after the test. This leads
to unexpected results in subsequent tests.

Review: https://reviews.apache.org/api/review-requests/40453/


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

Branch: refs/heads/master
Commit: c481a4d4d9a9c97c56bb06b6f6e71ec0e5958d49
Parents: ed8f3c0
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Mon Nov 30 21:03:18 2015 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Mon Nov 30 21:27:49 2015 +0100

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/ssl/gtest.hpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c481a4d4/3rdparty/libprocess/include/process/ssl/gtest.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/ssl/gtest.hpp b/3rdparty/libprocess/include/process/ssl/gtest.hpp
index 95e1984..2ca7055 100644
--- a/3rdparty/libprocess/include/process/ssl/gtest.hpp
+++ b/3rdparty/libprocess/include/process/ssl/gtest.hpp
@@ -66,6 +66,13 @@ class SSLTemporaryDirectoryTest : public TemporaryDirectoryTest {};
  */
 class SSLTemporaryDirectoryTest : public TemporaryDirectoryTest
 {
+public:
+  static void TearDownTestCase()
+  {
+    // Clear and reset any environment variables.
+    set_environment_variables({});
+  }
+
 protected:
   /**
    * @return The path to the authorized private key.
@@ -103,7 +110,7 @@ protected:
    * Wipes out existing SSL environment variables and replaces them
    * with the given map.  The SSL library is reinitialized afterwards.
    */
-  void set_environment_variables(
+  static void set_environment_variables(
       const std::map<std::string, std::string>& environment)
   {
     // This unsets all the SSL environment variables. Necessary for