Repository: mesos
Updated Branches:
  refs/heads/master 1dd072738 -> 4de848281


Ignored subsequent calls to 'resourceOffers' in
'ReservationTest.CompatibleCheckpointedResources' test.

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


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

Branch: refs/heads/master
Commit: 4de8482816e2105e324235b868a58f63a27b554f
Parents: 1dd0727
Author: Michael Park <[email protected]>
Authored: Mon Jul 13 13:43:48 2015 -0700
Committer: Jie Yu <[email protected]>
Committed: Mon Jul 13 13:43:48 2015 -0700

----------------------------------------------------------------------
 src/tests/reservation_tests.cpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4de84828/src/tests/reservation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reservation_tests.cpp b/src/tests/reservation_tests.cpp
index 99bf393..aeee367 100644
--- a/src/tests/reservation_tests.cpp
+++ b/src/tests/reservation_tests.cpp
@@ -617,7 +617,7 @@ TEST_F(ReservationTest, SendingCheckpointResourcesMessage)
   // The expectation for the first offer.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
     .WillOnce(FutureArg<1>(&offers))
-    .WillRepeatedly(Return());
+    .WillRepeatedly(Return()); // Ignore subsequent offers.
 
   EXPECT_CALL(sched, registered(&driver, _, _));
 
@@ -714,7 +714,7 @@ TEST_F(ReservationTest, ResourcesCheckpointing)
   // The expectation for the offer.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
     .WillOnce(FutureArg<1>(&offers))
-    .WillRepeatedly(Return());
+    .WillRepeatedly(Return()); // Ignore subsequent offers.
 
   EXPECT_CALL(sched, registered(&driver, _, _));
 
@@ -805,7 +805,7 @@ TEST_F(ReservationTest, MasterFailover)
   // The expectation for the first offer.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
     .WillOnce(FutureArg<1>(&offers))
-    .WillRepeatedly(Return());
+    .WillRepeatedly(Return()); // Ignore subsequent offers.
 
   EXPECT_CALL(sched, registered(&driver, _, _));
 
@@ -924,7 +924,8 @@ TEST_F(ReservationTest, CompatibleCheckpointedResources)
 
   // The expectation for the first offer.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
-    .WillOnce(FutureArg<1>(&offers));
+    .WillOnce(FutureArg<1>(&offers))
+    .WillRepeatedly(Return()); // Ignore subsequent offers.
 
   EXPECT_CALL(sched, registered(&driver, _, _));
 
@@ -1039,7 +1040,7 @@ TEST_F(ReservationTest, 
CompatibleCheckpointedResourcesWithPersistentVolumes)
 
   EXPECT_CALL(sched, resourceOffers(&driver, _))
     .WillOnce(FutureArg<1>(&offers))
-    .WillRepeatedly(Return());
+    .WillRepeatedly(Return()); // Ignore subsequent offers.
 
   EXPECT_CALL(sched, registered(&driver, _, _));
 
@@ -1154,7 +1155,7 @@ TEST_F(ReservationTest, IncompatibleCheckpointedResources)
 
   EXPECT_CALL(sched, resourceOffers(&driver, _))
     .WillOnce(FutureArg<1>(&offers))
-    .WillRepeatedly(Return());
+    .WillRepeatedly(Return()); // Ignore subsequent offers.
 
   EXPECT_CALL(sched, registered(&driver, _, _));
 

Reply via email to