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/05/31 23:27:35 UTC
svn commit: r1344919 - in /incubator/mesos/trunk/src:
slave/process_based_isolation_module.cpp tests/slave_tests.cpp
Author: benh
Date: Thu May 31 21:27:35 2012
New Revision: 1344919
URL: http://svn.apache.org/viewvc?rev=1344919&view=rev
Log:
Fixed bug with slave garbage collection tests (contributed by Vinod Kone, https://reviews.apache.org/r/5072).
Modified:
incubator/mesos/trunk/src/slave/process_based_isolation_module.cpp
incubator/mesos/trunk/src/tests/slave_tests.cpp
Modified: incubator/mesos/trunk/src/slave/process_based_isolation_module.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/process_based_isolation_module.cpp?rev=1344919&r1=1344918&r2=1344919&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/process_based_isolation_module.cpp (original)
+++ incubator/mesos/trunk/src/slave/process_based_isolation_module.cpp Thu May 31 21:27:35 2012
@@ -255,8 +255,8 @@ void ProcessBasedIsolationModule::proces
LOG(INFO) << "Telling slave of lost executor " << executorId
<< " of framework " << frameworkId;
- dispatch(slave, &Slave::executorExited, frameworkId, executorId,
- status);
+ dispatch(slave, &Slave::executorExited,
+ frameworkId, executorId, status);
// Try and cleanup after the executor.
killExecutor(frameworkId, executorId);
Modified: incubator/mesos/trunk/src/tests/slave_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/slave_tests.cpp?rev=1344919&r1=1344918&r2=1344919&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/slave_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/slave_tests.cpp Thu May 31 21:27:35 2012
@@ -191,15 +191,18 @@ string SlaveTest::workDir;
TEST_F(SlaveTest, GarbageCollectSlaveDirs)
{
- trigger slaveRegisteredMsg;
process::Message message;
-
+ trigger slaveRegisteredMsg;
EXPECT_MESSAGE(filter, Eq(SlaveRegisteredMessage().GetTypeName()), _, _)
.WillRepeatedly(DoAll(
SaveArgField<0>(&process::MessageEvent::message, &message),
Trigger(&slaveRegisteredMsg),
Return(false)));
+ trigger lostSlaveMsg;
+ EXPECT_MESSAGE(filter, Eq(LostSlaveMessage().GetTypeName()), _, _)
+ .WillRepeatedly(DoAll(Trigger(&lostSlaveMsg), Return(false)));
+
EXPECT_CALL(sched, registered(_, _, _))
.Times(1);
@@ -245,6 +248,8 @@ TEST_F(SlaveTest, GarbageCollectSlaveDir
hours timeout(slave::GC_TIMEOUT_HOURS);
Clock::advance(timeout.secs());
+ WAIT_UNTIL(lostSlaveMsg);
+
// Reset the triggers.
slaveRegisteredMsg.value = false;
resourceOffersCall.value = false;