You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2018/08/20 14:38:12 UTC
[mesos] 01/05: Fixed an expectation in the master tests.
This is an automated email from the ASF dual-hosted git repository.
alexr pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 4aec838fc33aa190079ac38b57bda8234d289296
Author: Greg Mann <gr...@mesosphere.io>
AuthorDate: Mon Aug 20 11:59:31 2018 +0200
Fixed an expectation in the master tests.
In `MasterTest.TaskStateMetrics`, since the clock is resumed at the
end of the test, it's possible that the allocation interval may elapse
on a heavily-loaded machine and the scheduler may receive additional
offers.
This patch updates an expectation to accommodate additional offers
sent to the scheduler.
Review: https://reviews.apache.org/r/68345/
---
src/tests/master_tests.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 5accfbb..1db8ed7 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -9214,7 +9214,8 @@ TEST_F(MasterTest, TaskStateMetrics)
Future<Event::Offers> offers2;
EXPECT_CALL(*scheduler, offers(_, _))
- .WillOnce(FutureArg<1>(&offers2));
+ .WillOnce(FutureArg<1>(&offers2))
+ .WillRepeatedly(Return()); // Ignore subsequent offers.
Clock::advance(masterFlags.allocation_interval);