-
Notifications
You must be signed in to change notification settings - Fork 78
Simulate fault #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What kind of faults? |
Sorry for the lack of details. I meant to come back and fill the details. The base and most useful case is simulating a network failure/disconnect (usually an EOF) mid transmission. That happens often to regular users so it interesting to test. This can also be used to simulate an offline mode. It would also be nice to be able to control the frames that sent (like in chunked encoding) to introduce delays between chunks and also failures after a number of chunks. See the Java implementation: https://wiremock.org/docs/simulating-faults/#bad-responses |
One array that would be very interesting for us are things that translate to |
Yep that is exactly my thought @konstin, I would like to try our logic for cloud connectivity and ensure that the code reacts correctly when the network is unstable. |
That sounds like a good enough characterization and I'd be happy to support it. |
Add `MockBuilder::respond_with_err` to respond with an arbitrary Rust error instead of an HTTP error. Due to overlapping impl constraints, `RespondErr` only supports passing a function that returns an error and not the error itself. Fixes LukeMathWalker#149
It would be very useful to be able simulate faults to test how the program reacts to them.
The text was updated successfully, but these errors were encountered: