You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2016/03/04 17:34:32 UTC

mesos git commit: Added AWAIT_READY() call to reservation_endpoint_tests.

Repository: mesos
Updated Branches:
  refs/heads/master aafd13385 -> d26baee1f


Added AWAIT_READY() call to reservation_endpoint_tests.

Calling .get() on a future is a blocking operation and a test calling
get() without prior waiting for the future (e.g., AWAIT_READY()) can
block forever.

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


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

Branch: refs/heads/master
Commit: d26baee1f377aedb148ad04cc004bb38b85ee4f6
Parents: aafd133
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Fri Mar 4 17:34:09 2016 +0100
Committer: Bernd Mathiske <be...@mesosphere.io>
Committed: Fri Mar 4 17:34:09 2016 +0100

----------------------------------------------------------------------
 src/tests/reservation_endpoints_tests.cpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d26baee1/src/tests/reservation_endpoints_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reservation_endpoints_tests.cpp b/src/tests/reservation_endpoints_tests.cpp
index f3a1438..f95ae7a 100644
--- a/src/tests/reservation_endpoints_tests.cpp
+++ b/src/tests/reservation_endpoints_tests.cpp
@@ -459,6 +459,7 @@ TEST_F(ReservationEndpointsTest, ReserveAvailableAndOfferedResources)
   // Send a KillTask message to the master.
   driver.killTask(taskInfo.task_id());
 
+  AWAIT_READY(availableResources);
   EXPECT_TRUE(availableResources.get().contains(available));
 
   // At this point, we have 'available' resources in the allocator, and
@@ -622,6 +623,7 @@ TEST_F(ReservationEndpointsTest, UnreserveAvailableAndOfferedResources)
   // Send a KillTask message to the master.
   driver.killTask(taskInfo.task_id());
 
+  AWAIT_READY(availableResources);
   EXPECT_TRUE(availableResources.get().contains(available));
 
   // At this point, we have 'available' resources in the allocator, and