SERVER-45468, the new OplogFetcher will be using DBClientConnection and DBClientCursor for oplog fetching. In order to convert the unit tests, we need a way to intercept outgoing client requests and to simulate network responses.
The MockDBClientConnection already implements the query and runCommandWithTarget mock, which are used by the initial sync cloner tests. But for the new OplogFetcher, it doesn't use these APIs. For oplog fetching using exhaust cursors, it mostly uses the call() and recv() APIs.
So in this ticket, we will implement call() and recv() so that we can:
- intercept outgoing client requests
- simulate network responses (for both call() and recv())
- allow network operations be blocked waiting for mock responses
- know if the MockDBClientConnection is blocked on network operations