* Check for the events that should be logged when a new connection is created. * * Returns the connection ID allocated by the server. */
| 300 | * Returns the connection ID allocated by the server. |
| 301 | */ |
| 302 | uint32_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. |
no test coverage detected