Repository: mesos
Updated Branches:
  refs/heads/master 7c96affbd -> 2a391e803


Fixed scheduler tests to work with heartbeats.

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


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

Branch: refs/heads/master
Commit: 2a391e8036303f08aa42dc9c66c210940ec8d21f
Parents: 7c96aff
Author: Vinod Kone <[email protected]>
Authored: Thu Aug 13 16:17:52 2015 -0700
Committer: Vinod Kone <[email protected]>
Committed: Thu Aug 13 17:02:39 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/2a391e80/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index 837d9e8..7842f27 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -97,7 +97,14 @@ ACTION_P(Enqueue, queue)
 {
   std::queue<Event> events = arg0;
   while (!events.empty()) {
-    queue->put(events.front());
+    // Note that we currently drop HEARTBEATs because most of these tests
+    // are not designed to deal with heartbeats.
+    // TODO(vinod): Implement DROP_HTTP_CALLS that can filter heartbeats.
+    if (events.front().type() == Event::HEARTBEAT) {
+      VLOG(1) << "Ignoring HEARTBEAT event";
+    } else {
+      queue->put(events.front());
+    }
     events.pop();
   }
 }

Reply via email to