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 2015/10/06 01:01:38 UTC

mesos git commit: Fixed a flaky oversubscription test.

Repository: mesos
Updated Branches:
  refs/heads/master 6267a925e -> 48980012e


Fixed a flaky oversubscription test.

The expectation needs to be added before it becomes possible
for the estimation to make its way to the master.

Review: https://reviews.apache.org/r/39025


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/48980012
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/48980012
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/48980012

Branch: refs/heads/master
Commit: 48980012ea270840edb818f570787324baad251d
Parents: 6267a92
Author: Benjamin Mahler <be...@gmail.com>
Authored: Mon Oct 5 15:12:44 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Mon Oct 5 15:24:45 2015 -0700

----------------------------------------------------------------------
 src/tests/oversubscription_tests.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/48980012/src/tests/oversubscription_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/oversubscription_tests.cpp b/src/tests/oversubscription_tests.cpp
index 561e922..2cf047e 100644
--- a/src/tests/oversubscription_tests.cpp
+++ b/src/tests/oversubscription_tests.cpp
@@ -986,16 +986,14 @@ TEST_F(OversubscriptionTest, UpdateAllocatorOnSchedulerFailover)
   AWAIT_READY(sched1Error);
 
   // Check if framework receives revocable offers.
+  Future<vector<Offer>> offers2;
+  EXPECT_CALL(sched2, resourceOffers(&driver2, _))
+    .WillOnce(FutureArg<1>(&offers2));
 
   Resources taskResources = createRevocableResources("cpus", "1");
   Resources executorResources = createRevocableResources("cpus", "1");
   estimations.put(taskResources + executorResources);
 
-  Future<vector<Offer>> offers2;
-  EXPECT_CALL(sched2, resourceOffers(&driver2, _))
-    .WillOnce(FutureArg<1>(&offers2))
-    .WillRepeatedly(Return());
-
   AWAIT_READY(offers2);
   EXPECT_NE(0u, offers2.get().size());
   EXPECT_EQ(taskResources + executorResources,