[prev in list] [next in list] [prev in thread] [next in thread]
List: mesos-commits
Subject: [2/2] mesos git commit: Add a TearDownTestCase method for cleaning up after tests that reinitialize
From: tillt () apache ! org
Date: 2015-11-30 20:28:41
Message-ID: eaad7c0ec4eb47529f025dd7a64406bd () git ! apache ! org
[Download RAW message or body]
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 <joseph@mesosphere.io>
Authored: Mon Nov 30 21:03:18 2015 +0100
Committer: Till Toenshoff <toenshoff@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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic