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 2013/11/20 23:56:00 UTC
[2/2] git commit: Fixed a flaky test: AllocatorTest/SchedulerFailover.
Fixed a flaky test: AllocatorTest/SchedulerFailover.
Review: https://reviews.apache.org/r/15707
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e45faa65
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e45faa65
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e45faa65
Branch: refs/heads/master
Commit: e45faa656f84540cf0083d0bf198177605b1020f
Parents: 82a0d32
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Tue Nov 19 16:21:29 2013 -0800
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Wed Nov 20 14:47:01 2013 -0800
----------------------------------------------------------------------
src/tests/allocator_tests.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e45faa65/src/tests/allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/allocator_tests.cpp b/src/tests/allocator_tests.cpp
index 61ab235..3f231e3 100644
--- a/src/tests/allocator_tests.cpp
+++ b/src/tests/allocator_tests.cpp
@@ -982,7 +982,7 @@ TYPED_TEST(AllocatorTest, SchedulerFailover)
// _separate_ from the expectation below so that this expectation is
// checked last and matches all possible offers.
EXPECT_CALL(sched1, resourceOffers(_, _))
- .WillRepeatedly(DeclineOffers());
+ .WillRepeatedly(DeclineOffers()); // For subsequent offers.
// Initially, all of slave1's resources are avaliable.
EXPECT_CALL(sched1, resourceOffers(_, OfferEq(3, 1024)))
@@ -991,7 +991,9 @@ TYPED_TEST(AllocatorTest, SchedulerFailover)
// We don't filter the unused resources to make sure that
// they get offered to the framework as soon as it fails over.
EXPECT_CALL(this->allocator, resourcesUnused(_, _, _, _))
- .WillOnce(InvokeUnusedWithFilters(&this->allocator, 0));
+ .WillOnce(InvokeUnusedWithFilters(&this->allocator, 0))
+ // For subsequent offers.
+ .WillRepeatedly(InvokeUnusedWithFilters(&this->allocator, 0));
EXPECT_CALL(exec, registered(_, _, _, _));