Improve test utils for running request (#512)

### Motivation

To land support for async/await, we need test utilities. We already have a `MockRequestExecutor`. Let's improve this to better handle on and off `EventLoop` request processing.

### Changes

- Move `MockRequestExecutor` into its own file
- Add blocking APIs to `MockRequestExecutor` when called from another thread
This commit is contained in:
Fabian Fett
2021-12-03 16:33:43 +01:00
committed by GitHub
parent 5ce7377a8a
commit 65d97ff5ff
3 changed files with 301 additions and 77 deletions
@@ -641,7 +641,7 @@ internal struct HTTPResponseBuilder {
}
}
internal struct RequestInfo: Codable {
internal struct RequestInfo: Codable, Equatable {
var data: String
var requestNumber: Int
var connectionNumber: Int