Repository: mesos Updated Branches: refs/heads/master 9a3001c0b -> 2cc8d6488
Fixed AllocatorTest.FrameworkExited test. Review: https://reviews.apache.org/r/26144 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2cc8d648 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2cc8d648 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2cc8d648 Branch: refs/heads/master Commit: 2cc8d648899dd607e76bb94a5763522c42a43450 Parents: 9a3001c Author: Vinod Kone <[email protected]> Authored: Mon Sep 29 12:25:18 2014 -0700 Committer: Vinod Kone <[email protected]> Committed: Mon Sep 29 14:09:57 2014 -0700 ---------------------------------------------------------------------- src/tests/allocator_tests.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/2cc8d648/src/tests/allocator_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/allocator_tests.cpp b/src/tests/allocator_tests.cpp index 9cd5da3..b824f77 100644 --- a/src/tests/allocator_tests.cpp +++ b/src/tests/allocator_tests.cpp @@ -1440,7 +1440,11 @@ TYPED_TEST(AllocatorTest, FrameworkExited) EXPECT_CALL(sched2, resourceOffers(_, OfferEq(1, 512))) .WillOnce(LaunchTasks(executor2, 1, 1, 256, "*")); - EXPECT_CALL(this->allocator, resourcesRecovered(_, _, _, _)); + // The framework 2 does not use all the resources. + Future<Nothing> resourcesRecovered2; + EXPECT_CALL(this->allocator, resourcesRecovered(_, _, _, _)) + .WillOnce(DoAll(InvokeResourcesRecovered(&this->allocator), + FutureSatisfy(&resourcesRecovered2))); EXPECT_CALL(exec2, registered(_, _, _, _)); @@ -1451,6 +1455,8 @@ TYPED_TEST(AllocatorTest, FrameworkExited) AWAIT_READY(launchTask); + AWAIT_READY(resourcesRecovered2); + // Shut everything down but check that framework 2 gets the // resources from framework 1 after it is shutdown. EXPECT_CALL(this->allocator, resourcesRecovered(_, _, _, _))
