Fixed use of 'GTEST_IS_THREADSAFE'.

Fixed use of 'GTEST_IS_THREADSAFE'.

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


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

Branch: refs/heads/master
Commit: d4fcff0e9a0ac41211d5e92fde30d932ce0a6fc0
Parents: 82f3ab1
Author: Jan Schlicht <j...@mesosphere.io>
Authored: Wed May 17 10:21:52 2017 -0700
Committer: Neil Conway <neil.con...@gmail.com>
Committed: Wed May 17 10:47:48 2017 -0700

----------------------------------------------------------------------
 src/tests/environment.cpp | 14 ++++----------
 src/tests/main.cpp        |  2 +-
 2 files changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d4fcff0e/src/tests/environment.cpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.cpp b/src/tests/environment.cpp
index 3d2d8f1..047798c 100644
--- a/src/tests/environment.cpp
+++ b/src/tests/environment.cpp
@@ -80,6 +80,7 @@ using process::Owned;
 
 using stout::internal::tests::TestFilter;
 
+
 namespace mesos {
 namespace internal {
 namespace tests {
@@ -716,16 +717,9 @@ void Environment::SetUp()
     os::setenv("MESOS_NATIVE_JAVA_LIBRARY", path);
   }
 
-  // TODO(hausdorff): Revisit whether we need this check when we complete work
-  // to light up Agent tests on Windows (see epic tracking this work at
-  // MESOS-6695). As we incrementally add tests to the Windows build, we will
-  // add this check to the tests that need it; eventually, the goal is to get
-  // rid of this altogether. See MESOS-5903.
-#ifndef __WINDOWS__
-  if (!GTEST_IS_THREADSAFE) {
-    EXIT(EXIT_FAILURE) << "Testing environment is not thread safe, bailing!";
-  }
-#endif // __WINDOWS__
+#if !GTEST_IS_THREADSAFE
+  EXIT(EXIT_FAILURE) << "Testing environment is not thread safe, bailing!";
+#endif // !GTEST_IS_THREADSAFE
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d4fcff0e/src/tests/main.cpp
----------------------------------------------------------------------
diff --git a/src/tests/main.cpp b/src/tests/main.cpp
index 5d062c3..a7dc99b 100644
--- a/src/tests/main.cpp
+++ b/src/tests/main.cpp
@@ -158,7 +158,7 @@ int main(int argc, char** argv)
 
   // Instantiate our environment. Note that it will be managed by
   // gtest after we add it via testing::AddGlobalTestEnvironment.
-  environment = new Environment(flags);
+  environment = new tests::Environment(flags);
 
   testing::AddGlobalTestEnvironment(environment);
 

Reply via email to