[ISILONQE-1417] Pike TimeoutError should be actionable #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add context to
TimeoutError
by optionally allowing it to be raisedwith_future
specified. If theFuture
has a.request
attribute, then it will be included in theTimeoutError
string representation.Callers may catch the
TimeoutError
and further inspect the.future
or even wait for it again.Update pike's use of
Future
to include relevant "request" context information where possible.Existing raisers of
pike.model.TimeoutError
outside of this package are unaffected as the signature and behavior of TimeoutError are backward compatible with the previous implementation.Testing Done
No explicit test cases are added for this change. Some scenarios were manually generated as an example and to check all code paths.
Connect Timeout
Session Setup Timeout:
Tree Timeout
Lease Timeout
Oplock Timeout
Create Timeout
Write Timeout
(This one could actually contain up to 1Mb of data, yikes!)
On a Future that has received an interim response
Still works without a future passed: