You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/05/30 20:45:05 UTC

git commit: Fixed SchedulerTest.MetricsEndpoint test.

Repository: mesos
Updated Branches:
  refs/heads/master 67ced4868 -> 4a2e63fe5


Fixed SchedulerTest.MetricsEndpoint test.

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


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

Branch: refs/heads/master
Commit: 4a2e63fe5379835c8f5aaee67b34a0c4f5a35e13
Parents: 67ced48
Author: Dominic Hamon <dh...@twopensource.com>
Authored: Fri May 30 11:44:42 2014 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Fri May 30 11:44:43 2014 -0700

----------------------------------------------------------------------
 src/tests/scheduler_tests.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4a2e63fe/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index 721d1cf..bd3c22d 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -67,11 +67,14 @@ TEST_F(SchedulerTest, MetricsEndpoint)
   MesosSchedulerDriver driver(
       &sched, DEFAULT_FRAMEWORK_INFO, master.get(), DEFAULT_CREDENTIAL);
 
+  Future<Nothing> registered;
   EXPECT_CALL(sched, registered(&driver, _, _))
-    .Times(1);
+    .WillOnce(FutureSatisfy(&registered));
 
   ASSERT_EQ(DRIVER_RUNNING, driver.start());
 
+  AWAIT_READY(registered);
+
   Future<process::http::Response> response =
     process::http::get(MetricsProcess::instance()->self(), "/snapshot");