Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixes go-openapi#126 This PR implements the proposal N°1 exposed in issue go-openapi#126: * if there is a non-zero timeout set with the request, we add this timeout to the operation context * applicable contexts are: runtime.Context -> operation.Context -> context.WithTimeout(t>0) * the actual behavior is determined by the shortest deadline set on those contexts * added unit tests to assert that the different contexts are formed correctly: * an operation with no context inherits from the runtime context * an operation with no timeout set (by context or parameter) defaults to 30s (default timeout) * when several timeouts are set, the shortest wins * an operation with no timeout in context and a 0 timeout param waits for ever (and not with immediate timeout) Signed-off-by: Frédéric BIDON <[email protected]>
- Loading branch information