* Check for the events that should be after a handler returns. */
| 370 | * Check for the events that should be after a handler returns. |
| 371 | */ |
| 372 | void checkCallPostHandlerEvents(const std::shared_ptr<EventLog>& log, |
| 373 | uint32_t connId, |
| 374 | uint32_t callId, |
| 375 | const string& callName) { |
| 376 | // Pre-write |
| 377 | Event event = log->waitForEvent(); |
| 378 | BOOST_CHECK_EQUAL(EventLog::ET_PRE_WRITE, event.type); |
| 379 | BOOST_CHECK_EQUAL(connId, event.connectionId); |
| 380 | BOOST_CHECK_EQUAL(callId, event.callId); |
| 381 | BOOST_CHECK_EQUAL(callName, event.message); |
| 382 | |
| 383 | // Post-write |
| 384 | event = log->waitForEvent(); |
| 385 | BOOST_CHECK_EQUAL(EventLog::ET_POST_WRITE, event.type); |
| 386 | BOOST_CHECK_EQUAL(connId, event.connectionId); |
| 387 | BOOST_CHECK_EQUAL(callId, event.callId); |
| 388 | BOOST_CHECK_EQUAL(callName, event.message); |
| 389 | |
| 390 | // Call finished |
| 391 | event = log->waitForEvent(); |
| 392 | BOOST_CHECK_EQUAL(EventLog::ET_CALL_FINISHED, event.type); |
| 393 | BOOST_CHECK_EQUAL(connId, event.connectionId); |
| 394 | BOOST_CHECK_EQUAL(callId, event.callId); |
| 395 | BOOST_CHECK_EQUAL(callName, event.message); |
| 396 | |
| 397 | // It is acceptable for servers to call processContext() again immediately |
| 398 | // to start waiting on the next request. However, some servers wait before |
| 399 | // getting either a partial request or the full request before calling |
| 400 | // processContext(). We don't check for the next call to processContext() |
| 401 | // yet. |
| 402 | } |
| 403 | |
| 404 | /** |
| 405 | * Check for the events that should be logged when a call is made. |
no test coverage detected