You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2015/09/17 01:13:59 UTC

[1/2] mesos git commit: Qualified MAX_REAP_INTERVAL with process:: in the tests.

Repository: mesos
Updated Branches:
  refs/heads/master 9d5da8980 -> e1cd1bf92


Qualified MAX_REAP_INTERVAL with process:: in the tests.


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

Branch: refs/heads/master
Commit: 9458fa88f709208b771efd6d6daeaaf032d56f79
Parents: 9d5da89
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Wed Sep 16 16:06:42 2015 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Wed Sep 16 16:06:42 2015 -0700

----------------------------------------------------------------------
 src/tests/containerizer/launch_tests.cpp |  2 +-
 src/tests/slave_recovery_tests.cpp       | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9458fa88/src/tests/containerizer/launch_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/launch_tests.cpp b/src/tests/containerizer/launch_tests.cpp
index cf36678..dbe891c 100644
--- a/src/tests/containerizer/launch_tests.cpp
+++ b/src/tests/containerizer/launch_tests.cpp
@@ -131,7 +131,7 @@ TEST_F(MesosContainerizerLaunchTest, ROOT_ChangeRootfs)
 
   // Advance time until the internal reaper reaps the subprocess.
   while (s.get().status().isPending()) {
-    Clock::advance(MAX_REAP_INTERVAL());
+    Clock::advance(process::MAX_REAP_INTERVAL());
     Clock::settle();
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/9458fa88/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 5aa67fb..fd285fb 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -587,7 +587,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverUnregisteredExecutor)
 
   // Now advance time until the reaper reaps the executor.
   while (status.isPending()) {
-    Clock::advance(MAX_REAP_INTERVAL());
+    Clock::advance(process::MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -706,7 +706,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverTerminatedExecutor)
 
   // Now advance time until the reaper reaps the executor.
   while (status.isPending()) {
-    Clock::advance(MAX_REAP_INTERVAL());
+    Clock::advance(process::MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -1000,7 +1000,7 @@ TYPED_TEST(SlaveRecoveryTest, CleanupExecutor)
 
   // Now advance time until the reaper reaps the executor.
   while (status.isPending()) {
-    Clock::advance(MAX_REAP_INTERVAL());
+    Clock::advance(process::MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -1685,7 +1685,7 @@ TYPED_TEST(SlaveRecoveryTest, ShutdownSlave)
 
   // Now advance time until the reaper reaps the executor.
   while (executorTerminated.isPending()) {
-    Clock::advance(MAX_REAP_INTERVAL());
+    Clock::advance(process::MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -2563,7 +2563,7 @@ TYPED_TEST(SlaveRecoveryTest, PartitionedSlave)
 
   // Wait for the executor to be terminated.
   while (executorTerminated.isPending()) {
-    Clock::advance(MAX_REAP_INTERVAL());
+    Clock::advance(process::MAX_REAP_INTERVAL());
     Clock::settle();
   }
 


[2/2] mesos git commit: Removed old hard-coded instances of the reap interval.

Posted by bm...@apache.org.
Removed old hard-coded instances of the reap interval.

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


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

Branch: refs/heads/master
Commit: e1cd1bf92860902f9ccfbe2f58c0152b09f0f9eb
Parents: 9458fa8
Author: Guangya Liu <gy...@gmail.com>
Authored: Wed Sep 16 16:13:04 2015 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Wed Sep 16 16:13:31 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/tests/reap_tests.cpp    |  8 ++--
 .../libprocess/src/tests/subprocess_tests.cpp   | 49 ++++++++++----------
 2 files changed, 29 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e1cd1bf9/3rdparty/libprocess/src/tests/reap_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/reap_tests.cpp b/3rdparty/libprocess/src/tests/reap_tests.cpp
index 642ab97..a844ae2 100644
--- a/3rdparty/libprocess/src/tests/reap_tests.cpp
+++ b/3rdparty/libprocess/src/tests/reap_tests.cpp
@@ -76,7 +76,7 @@ TEST(ReapTest, NonChildProcess)
 
   // Now advance time until the Reaper reaps the grandchild.
   while (status.isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -90,7 +90,7 @@ TEST(ReapTest, NonChildProcess)
 
   // Now advance time until the child is reaped.
   while (status.isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -127,7 +127,7 @@ TEST(ReapTest, ChildProcess)
 
   // Now advance time until the reaper reaps the child.
   while (status.isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
 
@@ -176,7 +176,7 @@ TEST(ReapTest, TerminatedChildProcess)
   // Advance time until the reaper sends the notification.
   Clock::pause();
   while (status.isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e1cd1bf9/3rdparty/libprocess/src/tests/subprocess_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/subprocess_tests.cpp b/3rdparty/libprocess/src/tests/subprocess_tests.cpp
index ab75153..25d4a7b 100644
--- a/3rdparty/libprocess/src/tests/subprocess_tests.cpp
+++ b/3rdparty/libprocess/src/tests/subprocess_tests.cpp
@@ -25,6 +25,7 @@
 #include <process/gmock.hpp>
 #include <process/gtest.hpp>
 #include <process/io.hpp>
+#include <process/reap.hpp>
 #include <process/subprocess.hpp>
 
 #include <stout/foreach.hpp>
@@ -56,7 +57,7 @@ TEST_F(SubprocessTest, Status)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -76,7 +77,7 @@ TEST_F(SubprocessTest, Status)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -98,7 +99,7 @@ TEST_F(SubprocessTest, Status)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -120,7 +121,7 @@ TEST_F(SubprocessTest, Status)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -150,7 +151,7 @@ TEST_F(SubprocessTest, PipeOutput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -176,7 +177,7 @@ TEST_F(SubprocessTest, PipeOutput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -208,7 +209,7 @@ TEST_F(SubprocessTest, PipeInput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -250,7 +251,7 @@ TEST_F(SubprocessTest, PipeRedirect)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -286,7 +287,7 @@ TEST_F(SubprocessTest, PathOutput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -314,7 +315,7 @@ TEST_F(SubprocessTest, PathOutput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -351,7 +352,7 @@ TEST_F(SubprocessTest, PathInput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -390,7 +391,7 @@ TEST_F(SubprocessTest, FdOutput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -426,7 +427,7 @@ TEST_F(SubprocessTest, FdOutput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -468,7 +469,7 @@ TEST_F(SubprocessTest, FdInput)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -491,7 +492,7 @@ TEST_F(SubprocessTest, Default)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -574,7 +575,7 @@ TEST_F(SubprocessTest, Flags)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -640,7 +641,7 @@ TEST_F(SubprocessTest, Environment)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -671,7 +672,7 @@ TEST_F(SubprocessTest, Environment)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -705,7 +706,7 @@ TEST_F(SubprocessTest, EnvironmentWithSpaces)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -739,7 +740,7 @@ TEST_F(SubprocessTest, EnvironmentWithSpacesAndQuotes)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -776,7 +777,7 @@ TEST_F(SubprocessTest, EnvironmentOverride)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -820,7 +821,7 @@ TEST_F(SubprocessTest, Setup)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -859,7 +860,7 @@ TEST_F(SubprocessTest, SetupStatus)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();
@@ -887,7 +888,7 @@ TEST_F(SubprocessTest, SetupStatus)
   // Advance time until the internal reaper reaps the subprocess.
   Clock::pause();
   while (s.get().status().isPending()) {
-    Clock::advance(Seconds(1));
+    Clock::advance(MAX_REAP_INTERVAL());
     Clock::settle();
   }
   Clock::resume();