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 2014/12/04 00:14:11 UTC
[5/8] mesos git commit: Cleaned up the allocator method naming.
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp
index 796fe21..42ffe24 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -272,15 +272,15 @@ TEST_F(MasterAuthorizationTest, KillTask)
AWAIT_READY(status);
EXPECT_EQ(TASK_KILLED, status.get().state());
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
// Now complete authorization.
promise.set(true);
// No task launch should happen resulting in all resources being
// returned to the allocator.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
driver.stop();
driver.join();
@@ -348,8 +348,8 @@ TEST_F(MasterAuthorizationTest, SlaveRemoved)
EXPECT_CALL(sched, statusUpdate(&driver, _))
.WillOnce(FutureArg<1>(&status));
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
// Now complete authorization.
promise.set(true);
@@ -360,7 +360,7 @@ TEST_F(MasterAuthorizationTest, SlaveRemoved)
// No task launch should happen resulting in all resources being
// returned to the allocator.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
driver.stop();
driver.join();
@@ -422,20 +422,20 @@ TEST_F(MasterAuthorizationTest, SlaveDisconnected)
EXPECT_CALL(sched, slaveLost(&driver, _))
.Times(AtMost(1));
- Future<Nothing> slaveDeactivated =
- FUTURE_DISPATCH(_, &AllocatorProcess::slaveDeactivated);
+ Future<Nothing> deactivateSlave =
+ FUTURE_DISPATCH(_, &AllocatorProcess::deactivateSlave);
// Now stop the slave.
Stop(slave.get());
- AWAIT_READY(slaveDeactivated);
+ AWAIT_READY(deactivateSlave);
Future<TaskStatus> status;
EXPECT_CALL(sched, statusUpdate(&driver, _))
.WillOnce(FutureArg<1>(&status));
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
// Now complete authorization.
promise.set(true);
@@ -446,7 +446,7 @@ TEST_F(MasterAuthorizationTest, SlaveDisconnected)
// No task launch should happen resulting in all resources being
// returned to the allocator.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
driver.stop();
driver.join();
@@ -501,24 +501,24 @@ TEST_F(MasterAuthorizationTest, FrameworkRemoved)
// Wait until authorization is in progress.
AWAIT_READY(authorize);
- Future<Nothing> frameworkRemoved =
- FUTURE_DISPATCH(_, &AllocatorProcess::frameworkRemoved);
+ Future<Nothing> removeFramework =
+ FUTURE_DISPATCH(_, &AllocatorProcess::removeFramework);
// Now stop the framework.
driver.stop();
driver.join();
- AWAIT_READY(frameworkRemoved);
+ AWAIT_READY(removeFramework);
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
// Now complete authorization.
promise.set(true);
// No task launch should happen resulting in all resources being
// returned to the allocator.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
Shutdown(); // Must shutdown before 'containerizer' gets deallocated.
}
@@ -926,15 +926,15 @@ TEST_F(MasterAuthorizationTest, FrameworkRemovedBeforeRegistration)
Clock::settle();
Clock::resume();
- Future<Nothing> frameworkRemoved =
- FUTURE_DISPATCH(_, &AllocatorProcess::frameworkRemoved);
+ Future<Nothing> removeFramework =
+ FUTURE_DISPATCH(_, &AllocatorProcess::removeFramework);
// Now complete authorization.
promise.set(true);
// When the master tries to link to a non-existent framework PID
// it should realize the framework is gone and remove it.
- AWAIT_READY(frameworkRemoved);
+ AWAIT_READY(removeFramework);
Shutdown();
}
@@ -986,15 +986,15 @@ TEST_F(MasterAuthorizationTest, FrameworkRemovedBeforeReregistration)
// Wait until the second authorization attempt is in progress.
AWAIT_READY(authorize2);
- Future<Nothing> frameworkRemoved =
- FUTURE_DISPATCH(_, &AllocatorProcess::frameworkRemoved);
+ Future<Nothing> removeFramework =
+ FUTURE_DISPATCH(_, &AllocatorProcess::removeFramework);
// Stop the framework.
driver.stop();
driver.join();
// Wait until the framework is removed.
- AWAIT_READY(frameworkRemoved);
+ AWAIT_READY(removeFramework);
// Now complete the second authorization attempt.
promise2.set(true);
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 065fc3e..56cba65 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -1349,8 +1349,8 @@ TEST_F(MasterTest, LaunchAcrossSlavesTest)
combinedOffers.push_back(offers1.get()[0].id());
combinedOffers.push_back(offers2.get()[0].id());
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
driver.launchTasks(combinedOffers, tasks);
@@ -1359,7 +1359,7 @@ TEST_F(MasterTest, LaunchAcrossSlavesTest)
EXPECT_EQ(TaskStatus::REASON_INVALID_OFFERS, status.get().reason());
// The resources of the invalid offers should be recovered.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
EXPECT_CALL(exec, shutdown(_))
.Times(AtMost(1));
@@ -1429,8 +1429,8 @@ TEST_F(MasterTest, LaunchDuplicateOfferTest)
EXPECT_CALL(sched, statusUpdate(&driver, _))
.WillOnce(FutureArg<1>(&status));
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
driver.launchTasks(combinedOffers, tasks);
@@ -1439,7 +1439,7 @@ TEST_F(MasterTest, LaunchDuplicateOfferTest)
EXPECT_EQ(TaskStatus::REASON_INVALID_OFFERS, status.get().reason());
// The resources of the invalid offers should be recovered.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
EXPECT_CALL(exec, shutdown(_))
.Times(AtMost(1));
@@ -2180,8 +2180,8 @@ TEST_F(MasterTest, OfferTimeout)
EXPECT_CALL(sched, offerRescinded(&driver, _))
.WillOnce(FutureSatisfy(&offerRescinded));
- Future<Nothing> resourcesRecovered =
- FUTURE_DISPATCH(_, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources =
+ FUTURE_DISPATCH(_, &AllocatorProcess::recoverResources);
driver.start();
@@ -2197,7 +2197,7 @@ TEST_F(MasterTest, OfferTimeout)
AWAIT_READY(offerRescinded);
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
// Expect that the resources are re-offered to the framework after
// the rescind.
@@ -2466,8 +2466,8 @@ TEST_F(MasterTest, ReleaseResourcesForTerminalTaskWithPendingUpdates)
// Ensure status update manager handles TASK_FINISHED update.
AWAIT_READY(__statusUpdate2);
- Future<Nothing> resourcesRecovered = FUTURE_DISPATCH(
- _, &AllocatorProcess::resourcesRecovered);
+ Future<Nothing> recoverResources = FUTURE_DISPATCH(
+ _, &AllocatorProcess::recoverResources);
// Advance the clock so that the status update manager resends
// TASK_RUNNING update with 'latest_state' as TASK_FINISHED.
@@ -2476,7 +2476,7 @@ TEST_F(MasterTest, ReleaseResourcesForTerminalTaskWithPendingUpdates)
Clock::resume();
// Ensure the resources are recovered.
- AWAIT_READY(resourcesRecovered);
+ AWAIT_READY(recoverResources);
EXPECT_CALL(exec, shutdown(_))
.Times(AtMost(1));
@@ -2712,15 +2712,15 @@ TEST_F(MasterTest, SlaveActiveEndpoint)
ASSERT_SOME_EQ(JSON::Boolean(true), status);
- Future<Nothing> slaveDeactivated =
- FUTURE_DISPATCH(_, &AllocatorProcess::slaveDeactivated);
+ Future<Nothing> deactivateSlave =
+ FUTURE_DISPATCH(_, &AllocatorProcess::deactivateSlave);
// Inject a slave exited event at the master causing the master
// to mark the slave as disconnected.
process::inject::exited(slaveRegisteredMessage.get().to, master.get());
// Wait until master deactivates the slave.
- AWAIT_READY(slaveDeactivated);
+ AWAIT_READY(deactivateSlave);
// Verify slave is inactive.
response = process::http::get(master.get(), "state.json");
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index 94fd753..02a7129 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -658,40 +658,40 @@ public:
ON_CALL(*this, initialize(_, _, _))
.WillByDefault(InvokeInitialize(this));
- ON_CALL(*this, frameworkAdded(_, _, _))
+ ON_CALL(*this, addFramework(_, _, _))
.WillByDefault(InvokeFrameworkAdded(this));
- ON_CALL(*this, frameworkRemoved(_))
+ ON_CALL(*this, removeFramework(_))
.WillByDefault(InvokeFrameworkRemoved(this));
- ON_CALL(*this, frameworkActivated(_, _))
+ ON_CALL(*this, activateFramework(_, _))
.WillByDefault(InvokeFrameworkActivated(this));
- ON_CALL(*this, frameworkDeactivated(_))
+ ON_CALL(*this, deactivateFramework(_))
.WillByDefault(InvokeFrameworkDeactivated(this));
- ON_CALL(*this, slaveAdded(_, _, _, _))
+ ON_CALL(*this, addSlave(_, _, _, _))
.WillByDefault(InvokeSlaveAdded(this));
- ON_CALL(*this, slaveRemoved(_))
+ ON_CALL(*this, removeSlave(_))
.WillByDefault(InvokeSlaveRemoved(this));
- ON_CALL(*this, slaveDeactivated(_))
- .WillByDefault(InvokeSlaveDeactivated(this));
-
- ON_CALL(*this, slaveActivated(_))
+ ON_CALL(*this, activateSlave(_))
.WillByDefault(InvokeSlaveReactivated(this));
+ ON_CALL(*this, deactivateSlave(_))
+ .WillByDefault(InvokeSlaveDeactivated(this));
+
ON_CALL(*this, updateWhitelist(_))
.WillByDefault(InvokeUpdateWhitelist(this));
- ON_CALL(*this, resourcesRequested(_, _))
+ ON_CALL(*this, requestResources(_, _))
.WillByDefault(InvokeResourcesRequested(this));
- ON_CALL(*this, resourcesRecovered(_, _, _, _))
+ ON_CALL(*this, recoverResources(_, _, _, _))
.WillByDefault(InvokeResourcesRecovered(this));
- ON_CALL(*this, offersRevived(_))
+ ON_CALL(*this, reviveOffers(_))
.WillByDefault(InvokeOffersRevived(this));
}
@@ -706,50 +706,50 @@ public:
const process::PID<master::Master>&,
const hashmap<std::string, RoleInfo>&));
- MOCK_METHOD3(frameworkAdded, void(
+ MOCK_METHOD3(addFramework, void(
const FrameworkID&,
const FrameworkInfo&,
const Resources&));
- MOCK_METHOD1(frameworkRemoved, void(
+ MOCK_METHOD1(removeFramework, void(
const FrameworkID&));
- MOCK_METHOD2(frameworkActivated, void(
+ MOCK_METHOD2(activateFramework, void(
const FrameworkID&,
const FrameworkInfo&));
- MOCK_METHOD1(frameworkDeactivated, void(
+ MOCK_METHOD1(deactivateFramework, void(
const FrameworkID&));
- MOCK_METHOD4(slaveAdded, void(
+ MOCK_METHOD4(addSlave, void(
const SlaveID&,
const SlaveInfo&,
const Resources&,
const hashmap<FrameworkID, Resources>&));
- MOCK_METHOD1(slaveRemoved, void(
+ MOCK_METHOD1(removeSlave, void(
const SlaveID&));
- MOCK_METHOD1(slaveDeactivated, void(
+ MOCK_METHOD1(activateSlave, void(
const SlaveID&));
- MOCK_METHOD1(slaveActivated, void(
+ MOCK_METHOD1(deactivateSlave, void(
const SlaveID&));
MOCK_METHOD1(updateWhitelist, void(
const Option<hashset<std::string> >&));
- MOCK_METHOD2(resourcesRequested, void(
+ MOCK_METHOD2(requestResources, void(
const FrameworkID&,
const std::vector<Request>&));
- MOCK_METHOD4(resourcesRecovered, void(
+ MOCK_METHOD4(recoverResources, void(
const FrameworkID&,
const SlaveID&,
const Resources&,
const Option<Filters>& filters));
- MOCK_METHOD1(offersRevived, void(const FrameworkID&));
+ MOCK_METHOD1(reviveOffers, void(const FrameworkID&));
T real;
};
@@ -761,9 +761,9 @@ AllocatorTypes;
// The following actions make up for the fact that DoDefault
// cannot be used inside a DoAll, for example:
-// EXPECT_CALL(allocator, frameworkAdded(_, _, _))
+// EXPECT_CALL(allocator, addFramework(_, _, _))
// .WillOnce(DoAll(InvokeFrameworkAdded(&allocator),
-// FutureSatisfy(&frameworkAdded)));
+// FutureSatisfy(&addFramework)));
ACTION_P(InvokeInitialize, allocator)
{
@@ -780,7 +780,7 @@ ACTION_P(InvokeFrameworkAdded, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::frameworkAdded,
+ &master::allocator::AllocatorProcess::addFramework,
arg0,
arg1,
arg2);
@@ -791,7 +791,7 @@ ACTION_P(InvokeFrameworkRemoved, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::frameworkRemoved, arg0);
+ &master::allocator::AllocatorProcess::removeFramework, arg0);
}
@@ -799,7 +799,7 @@ ACTION_P(InvokeFrameworkActivated, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::frameworkActivated,
+ &master::allocator::AllocatorProcess::activateFramework,
arg0,
arg1);
}
@@ -809,7 +809,7 @@ ACTION_P(InvokeFrameworkDeactivated, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::frameworkDeactivated,
+ &master::allocator::AllocatorProcess::deactivateFramework,
arg0);
}
@@ -818,7 +818,7 @@ ACTION_P(InvokeSlaveAdded, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::slaveAdded,
+ &master::allocator::AllocatorProcess::addSlave,
arg0,
arg1,
arg2,
@@ -830,25 +830,25 @@ ACTION_P(InvokeSlaveRemoved, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::slaveRemoved,
+ &master::allocator::AllocatorProcess::removeSlave,
arg0);
}
-ACTION_P(InvokeSlaveDeactivated, allocator)
+ACTION_P(InvokeSlaveReactivated, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::slaveDeactivated,
+ &master::allocator::AllocatorProcess::activateSlave,
arg0);
}
-ACTION_P(InvokeSlaveReactivated, allocator)
+ACTION_P(InvokeSlaveDeactivated, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::slaveActivated,
+ &master::allocator::AllocatorProcess::deactivateSlave,
arg0);
}
@@ -866,7 +866,7 @@ ACTION_P(InvokeResourcesRequested, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::resourcesRequested,
+ &master::allocator::AllocatorProcess::requestResources,
arg0,
arg1);
}
@@ -876,7 +876,7 @@ ACTION_P(InvokeResourcesRecovered, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::resourcesRecovered,
+ &master::allocator::AllocatorProcess::recoverResources,
arg0,
arg1,
arg2,
@@ -891,7 +891,7 @@ ACTION_P2(InvokeResourcesRecoveredWithFilters, allocator, timeout)
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::resourcesRecovered,
+ &master::allocator::AllocatorProcess::recoverResources,
arg0,
arg1,
arg2,
@@ -903,7 +903,7 @@ ACTION_P(InvokeOffersRevived, allocator)
{
process::dispatch(
allocator->real,
- &master::allocator::AllocatorProcess::offersRevived,
+ &master::allocator::AllocatorProcess::reviveOffers,
arg0);
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/partition_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/partition_tests.cpp b/src/tests/partition_tests.cpp
index 0dc1a92..fea7801 100644
--- a/src/tests/partition_tests.cpp
+++ b/src/tests/partition_tests.cpp
@@ -444,8 +444,8 @@ TEST_F(PartitionTest, OneWayPartitionMasterToSlave)
AWAIT_READY(ping);
- Future<Nothing> slaveDeactivated =
- FUTURE_DISPATCH(_, &AllocatorProcess::slaveDeactivated);
+ Future<Nothing> deactivateSlave =
+ FUTURE_DISPATCH(_, &AllocatorProcess::deactivateSlave);
// Inject a slave exited event at the master causing the master
// to mark the slave as disconnected. The slave should not notice
@@ -453,7 +453,7 @@ TEST_F(PartitionTest, OneWayPartitionMasterToSlave)
process::inject::exited(slaveRegisteredMessage.get().to, master.get());
// Wait until master deactivates the slave.
- AWAIT_READY(slaveDeactivated);
+ AWAIT_READY(deactivateSlave);
Future<SlaveReregisteredMessage> slaveReregisteredMessage =
FUTURE_PROTOBUF(SlaveReregisteredMessage(), _, _);
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp b/src/tests/rate_limiting_tests.cpp
index e1fd3c2..7f5ca25 100644
--- a/src/tests/rate_limiting_tests.cpp
+++ b/src/tests/rate_limiting_tests.cpp
@@ -189,8 +189,8 @@ TEST_F(RateLimitingTest, NoRateLimiting)
EXPECT_EQ(1, metrics.values[messages_processed].as<JSON::Number>().value);
}
- Future<Nothing> frameworkRemoved =
- FUTURE_DISPATCH(_, &AllocatorProcess::frameworkRemoved);
+ Future<Nothing> removeFramework =
+ FUTURE_DISPATCH(_, &AllocatorProcess::removeFramework);
driver->stop();
driver->join();
@@ -200,7 +200,7 @@ TEST_F(RateLimitingTest, NoRateLimiting)
// 'sched' that reaches Master after its registration) gets
// processed without Clock advances proves that the framework is
// given unlimited rate.
- AWAIT_READY(frameworkRemoved);
+ AWAIT_READY(removeFramework);
// For metrics endpoint.
Clock::advance(Milliseconds(501));
@@ -568,8 +568,8 @@ TEST_F(RateLimitingTest, DifferentPrincipalFrameworks)
// 3. Remove a framework and its message counters are deleted while
// the other framework's counters stay.
- Future<Nothing> frameworkRemoved =
- FUTURE_DISPATCH(_, &AllocatorProcess::frameworkRemoved);
+ Future<Nothing> removeFramework =
+ FUTURE_DISPATCH(_, &AllocatorProcess::removeFramework);
driver1->stop();
driver1->join();
@@ -578,7 +578,7 @@ TEST_F(RateLimitingTest, DifferentPrincipalFrameworks)
// No need to advance again because we already advanced 1sec for
// sched2 so the RateLimiter for sched1 doesn't impose a delay this
// time.
- AWAIT_READY(frameworkRemoved);
+ AWAIT_READY(removeFramework);
// Settle to avoid the race between the removal of the counters and
// the metrics endpoint query.
@@ -735,8 +735,8 @@ TEST_F(RateLimitingTest, SamePrincipalFrameworks)
AWAIT_READY(duplicateFrameworkRegisteredMessage2);
- Future<Nothing> frameworkRemoved =
- FUTURE_DISPATCH(_, &AllocatorProcess::frameworkRemoved);
+ Future<Nothing> removeFramework =
+ FUTURE_DISPATCH(_, &AllocatorProcess::removeFramework);
driver1->stop();
driver1->join();
@@ -746,7 +746,7 @@ TEST_F(RateLimitingTest, SamePrincipalFrameworks)
Clock::settle();
Clock::advance(Seconds(1));
- AWAIT_READY(frameworkRemoved);
+ AWAIT_READY(removeFramework);
// Message counters are not removed after the first framework is
// unregistered.
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/resource_offers_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resource_offers_tests.cpp b/src/tests/resource_offers_tests.cpp
index c8c25d7..c4afc38 100644
--- a/src/tests/resource_offers_tests.cpp
+++ b/src/tests/resource_offers_tests.cpp
@@ -801,7 +801,7 @@ TEST_F(ResourceOffersTest, Request)
MesosSchedulerDriver driver(
&sched, DEFAULT_FRAMEWORK_INFO, master.get(), DEFAULT_CREDENTIAL);
- EXPECT_CALL(allocator, frameworkAdded(_, _, _))
+ EXPECT_CALL(allocator, addFramework(_, _, _))
.Times(1);
Future<Nothing> registered;
@@ -818,7 +818,7 @@ TEST_F(ResourceOffersTest, Request)
sent.push_back(request);
Future<vector<Request>> received;
- EXPECT_CALL(allocator, resourcesRequested(_, _))
+ EXPECT_CALL(allocator, requestResources(_, _))
.WillOnce(FutureArg<1>(&received));
driver.requestResources(sent);
@@ -828,10 +828,10 @@ TEST_F(ResourceOffersTest, Request)
EXPECT_NE(0u, received.get().size());
EXPECT_EQ(request.slave_id(), received.get()[0].slave_id());
- EXPECT_CALL(allocator, frameworkDeactivated(_))
+ EXPECT_CALL(allocator, deactivateFramework(_))
.Times(AtMost(1)); // Races with shutting down the cluster.
- EXPECT_CALL(allocator, frameworkRemoved(_))
+ EXPECT_CALL(allocator, removeFramework(_))
.Times(AtMost(1)); // Races with shutting down the cluster.
driver.stop();
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b84b52b/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 6cf5fb8..8bd0f14 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -2207,7 +2207,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
slave::Flags flags = this->CreateSlaveFlags();
- EXPECT_CALL(allocator, slaveAdded(_, _, _, _));
+ EXPECT_CALL(allocator, addSlave(_, _, _, _));
Try<TypeParam*> containerizer1 = TypeParam::create(flags, true);
ASSERT_SOME(containerizer1);
@@ -2225,7 +2225,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
MesosSchedulerDriver driver(
&sched, frameworkInfo, master.get(), DEFAULT_CREDENTIAL);
- EXPECT_CALL(allocator, frameworkAdded(_, _, _));
+ EXPECT_CALL(allocator, addFramework(_, _, _));
Future<FrameworkID> frameworkId;
EXPECT_CALL(sched, registered(_, _, _))
@@ -2258,7 +2258,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
// Wait for the ACK to be checkpointed.
AWAIT_READY(_statusUpdateAcknowledgement);
- EXPECT_CALL(allocator, slaveDeactivated(_));
+ EXPECT_CALL(allocator, deactivateSlave(_));
this->Stop(slave.get());
delete containerizer1.get();
@@ -2299,8 +2299,8 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
Future<SlaveReregisteredMessage> slaveReregisteredMessage =
FUTURE_PROTOBUF(SlaveReregisteredMessage(), _, _);
- EXPECT_CALL(allocator, slaveActivated(_));
- EXPECT_CALL(allocator, resourcesRecovered(_, _, _, _));
+ EXPECT_CALL(allocator, activateSlave(_));
+ EXPECT_CALL(allocator, recoverResources(_, _, _, _));
Future<TaskStatus> status;
EXPECT_CALL(sched, statusUpdate(_, _))
@@ -2344,14 +2344,14 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
Clock::resume();
- EXPECT_CALL(allocator, frameworkDeactivated(_))
+ EXPECT_CALL(allocator, deactivateFramework(_))
.WillRepeatedly(Return());
- EXPECT_CALL(allocator, frameworkRemoved(_))
+ EXPECT_CALL(allocator, removeFramework(_))
.WillRepeatedly(Return());
// If there was an outstanding offer, we can get a call to
- // resourcesRecovered when we stop the scheduler.
- EXPECT_CALL(allocator, resourcesRecovered(_, _, _, _))
+ // recoverResources when we stop the scheduler.
+ EXPECT_CALL(allocator, recoverResources(_, _, _, _))
.WillRepeatedly(Return());
driver.stop();