MCPcopy Create free account
hub / github.com/apache/mesos / subscribe

Method subscribe

src/tests/master/mock_master_api_subscriber.cpp:190–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190Future<Nothing> MockMasterAPISubscriber::subscribe(
191 const process::PID<Master>& masterPid,
192 ContentType contentType)
193{
194 if (subscribeCalled) {
195 return Failure(
196 "MockMasterAPISubscriber::subscribe should be called at most once");
197 }
198
199 subscribeCalled = true;
200
201 return dispatch(
202 pid,
203 &MockMasterAPISubscriberProcess::subscribe,
204 masterPid,
205 contentType);
206}
207
208
209void MockMasterAPISubscriber::handleEvent(const Event& event)

Callers 1

TEST_FFunction · 0.45

Calls 2

FailureClass · 0.85
dispatchFunction · 0.50

Tested by

no test coverage detected