MCPcopy Create free account
hub / github.com/apache/thrift / checkNewConnEvents

Function checkNewConnEvents

lib/cpp/test/processor/ProcessorTest.cpp:302–312  ·  view source on GitHub ↗

* Check for the events that should be logged when a new connection is created. * * Returns the connection ID allocated by the server. */

Source from the content-addressed store, hash-verified

300 * Returns the connection ID allocated by the server.
301 */
302uint32_t checkNewConnEvents(const std::shared_ptr<EventLog>& log) {
303 // Check for an ET_CONN_CREATED event
304 Event event = log->waitForEvent(2500);
305 BOOST_CHECK_EQUAL(EventLog::ET_CONN_CREATED, event.type);
306
307 // Some servers call the processContext() hook immediately.
308 // Others (TNonblockingServer) only call it once a full request is received.
309 // We don't check for it yet, to allow either behavior.
310
311 return event.connectionId;
312}
313
314/**
315 * Check for the events that should be logged when a connection is closed.

Callers 5

testEventSequencingFunction · 0.85
testSeparateConnectionsFunction · 0.85
testOnewayCallFunction · 0.85
testExpectedErrorFunction · 0.85
testUnexpectedErrorFunction · 0.85

Calls 1

waitForEventMethod · 0.45

Tested by

no test coverage detected