mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Mazumdar <>
Subject Re: Review Request 39372: Introduced a callback interface for testing the scheduler library.
Date Mon, 22 Feb 2016 20:19:47 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Feb. 22, 2016, 8:19 p.m.)

Review request for mesos and Vinod Kone.


Make this stale review for scheduler callbacks alive again.

Summary (updated)

Introduced a callback interface for testing the scheduler library.

Bugs: MESOS-3339

Repository: mesos

Description (updated)

This change adds a new callback based testing interface for the scheduler library similar
to the already existing one for the executor library.

This gets rid of the following hack:

// Enqueues all received events into a libprocess queue.
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 {


New way ( similar to what we do for the driver implementation )

EXPECT_CALL(callbacks, heartbeat())
    .WillRepeatedly(Return()); // Ignore heartbeats.

Diffs (updated)

  src/tests/mesos.hpp 242a11658c0a9ba4caced9b2b2bdbcb921f7fdd0 


Testing (updated)

make check (Would modify the tests to use the new interface in a subsequent change)


Anand Mazumdar

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message