You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/06/15 21:33:47 UTC

mesos git commit: Fixed the flaky oversbuscription tests.

Repository: mesos
Updated Branches:
  refs/heads/master d597c9314 -> c397fe2a3


Fixed the flaky oversbuscription tests.

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


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

Branch: refs/heads/master
Commit: c397fe2a3b24b5860eb859e5812b115945124cb8
Parents: d597c93
Author: Jie Yu <yu...@gmail.com>
Authored: Mon Jun 15 11:59:38 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Jun 15 11:59:57 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/c397fe2a/src/tests/oversubscription_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/oversubscription_tests.cpp b/src/tests/oversubscription_tests.cpp
index e7d94ce..fe6a848 100644
--- a/src/tests/oversubscription_tests.cpp
+++ b/src/tests/oversubscription_tests.cpp
@@ -216,7 +216,8 @@ TEST_F(OversubscriptionTest, FetchResourceUsageFromMonitor)
 
   Future<TaskStatus> status;
   EXPECT_CALL(sched, statusUpdate(&driver, _))
-    .WillOnce(FutureArg<1>(&status));
+    .WillOnce(FutureArg<1>(&status))
+    .WillRepeatedly(Return());       // Ignore subsequent updates.
 
   EXPECT_CALL(exec, registered(_, _, _, _));
 
@@ -385,7 +386,8 @@ TEST_F(OversubscriptionTest, RevocableOffer)
 
   Future<TaskStatus> status;
   EXPECT_CALL(sched, statusUpdate(&driver, _))
-    .WillOnce(FutureArg<1>(&status));
+    .WillOnce(FutureArg<1>(&status))
+    .WillRepeatedly(Return());       // Ignore subsequent updates.
 
   driver.launchTasks({offers1.get()[0].id(), offers2.get()[0].id()}, {task});
 
@@ -577,7 +579,8 @@ TEST_F(OversubscriptionTest, FixedResourceEstimator)
 
   Future<TaskStatus> status;
   EXPECT_CALL(sched, statusUpdate(&driver, _))
-    .WillOnce(FutureArg<1>(&status));
+    .WillOnce(FutureArg<1>(&status))
+    .WillRepeatedly(Return());       // Ignore subsequent updates.
 
   driver.launchTasks(offer.id(), {task});
 
@@ -652,7 +655,8 @@ TEST_F(OversubscriptionTest, QoSFetchResourceUsageFromMonitor)
 
   Future<TaskStatus> status;
   EXPECT_CALL(sched, statusUpdate(&driver, _))
-    .WillOnce(FutureArg<1>(&status));
+    .WillOnce(FutureArg<1>(&status))
+    .WillRepeatedly(Return());       // Ignore subsequent updates.
 
   EXPECT_CALL(exec, registered(_, _, _, _));