You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2016/10/05 16:26:13 UTC

[5/5] mesos git commit: Improved handling of tmp file creation in health check test.

Improved handling of tmp file creation in health check test.

The tmp file used in the HealthStatusChange test is now created inside
the tmp directory created for the test suite. This ensures that it will
be cleaned up on tear down.

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


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

Branch: refs/heads/master
Commit: ac859b4fee4bd54d7d8553078593dfcb444d3f31
Parents: be4e42f
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Oct 5 18:13:59 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Oct 5 18:24:29 2016 +0200

----------------------------------------------------------------------
 src/tests/health_check_tests.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ac859b4f/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index 27889dc..1d1676d 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -670,7 +670,7 @@ TEST_F(HealthCheckTest, HealthStatusChange)
   EXPECT_NE(0u, offers.get().size());
 
   // Create a temporary file.
-  Try<string> temporaryPath = os::mktemp();
+  Try<string> temporaryPath = os::mktemp(path::join(os::getcwd(), "XXXXXX"));
   ASSERT_SOME(temporaryPath);
   string tmpPath = temporaryPath.get();
 
@@ -831,8 +831,6 @@ TEST_F(HealthCheckTest, HealthStatusChange)
     EXPECT_SOME_TRUE(find);
   }
 
-  os::rm(tmpPath); // Clean up the temporary file.
-
   driver.stop();
   driver.join();
 }