You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/02/29 22:57:06 UTC

svn commit: r1295299 - /incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp

Author: benh
Date: Wed Feb 29 21:57:05 2012
New Revision: 1295299

URL: http://svn.apache.org/viewvc?rev=1295299&view=rev
Log:
Make FaultTolerenceTest.SchedulerFailoverStatusUpdate wait for executor shutdown (contributed by Charles Reiss).

Modified:
    incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp

Modified: incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp?rev=1295299&r1=1295298&r2=1295299&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp Wed Feb 29 21:57:05 2012
@@ -482,8 +482,9 @@ TEST(FaultToleranceTest, SchedulerFailov
   EXPECT_CALL(exec, launchTask(_, _))
     .WillOnce(SendStatusUpdate(TASK_RUNNING));
 
+  trigger shutdownCall;
   EXPECT_CALL(exec, shutdown(_))
-    .Times(AtMost(1));
+    .WillOnce(Trigger(&shutdownCall));
 
   map<ExecutorID, Executor*> execs;
   execs[DEFAULT_EXECUTOR_ID] = &exec;
@@ -583,6 +584,9 @@ TEST(FaultToleranceTest, SchedulerFailov
   process::terminate(master);
   process::wait(master);
 
+  // Ensures MockExecutor no longer being used by MesosExecutorDriver.
+  WAIT_UNTIL(shutdownCall);
+
   process::filter(NULL);
 
   Clock::resume();