Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
Mesosphere Sprint 20, Mesosphere Sprint 21, Mesosphere Sprint 22, Mesosphere Sprint 29
-
3
Description
Currently, our testing infrastructure does not have a mechanism of filtering/dropping HTTP events of a particular type from the Scheduler API response stream. We need a DROP_HTTP_CALLS abstraction that can help us to filter a particular event type.
// 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 { queue->put(events.front()); } events.pop(); } }
This helper code is duplicated in at least two places currently, Scheduler Library/Maintenance Primitives tests.
- The solution can be as trivial as moving this helper function to a common test-header.
- Implement a DROP_HTTP_CALLS similar to what we do for other protobufs via DROP_CALLS.
Attachments
Issue Links
- blocks
-
MESOS-4029 ContentType/SchedulerTest is flaky.
- Resolved
-
MESOS-3355 Testing the HTTP V1 API
- Resolved
- is related to
-
MESOS-3418 Factor out V1 API test helper functions
- Resolved
-
MESOS-4433 Implement a callback testing interface for the Executor Library
- Resolved