You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2013/08/22 19:56:00 UTC

[3/3] git commit: Fixed SlaveRecovery.Partitioned slave test.

Fixed SlaveRecovery.Partitioned slave test.

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


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

Branch: refs/heads/master
Commit: 82fa5bff4126b48d83dad5c96cfccb7fd634670d
Parents: 9aaad1d
Author: Vinod Kone <vi...@twitter.com>
Authored: Wed Aug 21 23:14:35 2013 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Wed Aug 21 23:15:29 2013 -0700

----------------------------------------------------------------------
 src/tests/slave_recovery_tests.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/82fa5bff/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 830af59..548e8c0 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -1909,6 +1909,9 @@ TYPED_TEST(SlaveRecoveryTest, PartitionedSlave)
   EXPECT_CALL(sched, statusUpdate(&driver, _))
     .WillOnce(FutureArg<1>(&status));
 
+  Future<Nothing> executorTerminated =
+    FUTURE_DISPATCH(_, &Slave::executorTerminated);
+
   Clock::pause();
 
   // Now, induce a partition of the slave by having the master
@@ -1938,6 +1941,15 @@ TYPED_TEST(SlaveRecoveryTest, PartitionedSlave)
   // Wait for the master to attempt to shut down the slave.
   AWAIT_READY(shutdownMessage);
 
+  // Wait for the executor to be terminated.
+  while (executorTerminated.isPending()) {
+    Clock::advance(Seconds(1));
+    Clock::settle();
+  }
+
+  AWAIT_READY(executorTerminated);
+  Clock::settle();
+
   this->Stop(slave.get());
 
   Future<RegisterSlaveMessage> registerSlaveMessage =