You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/10/10 21:44:34 UTC

[2/2] mesos git commit: Removed old scheduler callback handlers in maintenance tests.

Removed old scheduler callback handlers in maintenance tests.

The tests now use the v1 mock scheduler interface post MESOS-4948.


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

Branch: refs/heads/master
Commit: 13bedad396cf999ea00a66228cb3a88c01672477
Parents: 8d77eea
Author: Anand Mazumdar <an...@apache.org>
Authored: Mon Oct 10 14:41:11 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Mon Oct 10 14:41:11 2016 -0700

----------------------------------------------------------------------
 src/tests/master_maintenance_tests.cpp | 32 -----------------------------
 1 file changed, 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/13bedad3/src/tests/master_maintenance_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_maintenance_tests.cpp b/src/tests/master_maintenance_tests.cpp
index c103e8e..6917272 100644
--- a/src/tests/master_maintenance_tests.cpp
+++ b/src/tests/master_maintenance_tests.cpp
@@ -74,7 +74,6 @@ using process::Clock;
 using process::Future;
 using process::Owned;
 using process::PID;
-using process::Queue;
 using process::Time;
 
 using process::http::BadRequest;
@@ -147,40 +146,9 @@ public:
   // Default unavailability.  Used when the test does not care
   // about the value of the unavailability.
   Unavailability unavailability;
-
-protected:
-  // Helper class for using EXPECT_CALL since the Mesos scheduler API
-  // is callback based.
-  class Callbacks
-  {
-  public:
-    MOCK_METHOD0(connected, void());
-    MOCK_METHOD0(disconnected, void());
-    MOCK_METHOD1(received, void(const std::queue<Event>&));
-  };
 };
 
 
-// Enqueues all received events into a libprocess queue.
-// TODO(jmlvanre): Factor this common code out of tests into V1
-// helper.
-ACTION_P(Enqueue, queue)
-{
-  std::queue<Event> events = arg0;
-  while (!events.empty()) {
-    // 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();
-  }
-}
-
-
 // Posts valid and invalid schedules to the maintenance schedule endpoint.
 TEST_F(MasterMaintenanceTest, UpdateSchedule)
 {