Support for Faults #73

Closed
opened 2025-12-29 08:21:55 +01:00 by adam · 6 comments
Owner

Originally created by @MiguelAlho on GitHub (Mar 5, 2018).

Originally assigned to: @StefH on GitHub.

Are there any plans for implementing the support for faulty responses, as in http://wiremock.org/docs/simulating-faults/ ?

Originally created by @MiguelAlho on GitHub (Mar 5, 2018). Originally assigned to: @StefH on GitHub. Are there any plans for implementing the support for faulty responses, as in http://wiremock.org/docs/simulating-faults/ ?
adam added the question label 2025-12-29 08:21:55 +01:00
adam closed this issue 2025-12-29 08:21:55 +01:00
Author
Owner

@StefH commented on GitHub (Mar 5, 2018):

Can you explain which part of the faults functionality you would like to see in this project ?

@StefH commented on GitHub (Mar 5, 2018): Can you explain which part of the *faults* functionality you would like to see in this project ?
Author
Owner

@MiguelAlho commented on GitHub (Mar 5, 2018):

EMPTY_RESPONSE and MALFORMED_RESPONSE_CHUNK (at the end of the page) are currently interesting to me to create integratoon tests that verify a retry cycle. CONNECTION_RESET_BY_PEER also but that doesn't seem to be supported.

I'm also trying to figure out how to simulate a timeout...

@MiguelAlho commented on GitHub (Mar 5, 2018): EMPTY_RESPONSE and MALFORMED_RESPONSE_CHUNK (at the end of the page) are currently interesting to me to create integratoon tests that verify a retry cycle. CONNECTION_RESET_BY_PEER also but that doesn't seem to be supported. I'm also trying to figure out how to simulate a timeout...
Author
Owner

@StefH commented on GitHub (Mar 5, 2018):

  1. EMPTY_RESPONSE - I'll take a look
  2. MALFORMED_RESPONSE_CHUNK - I'll take a look
  3. Timeout - Would this help you ? https://github.com/WireMock-Net/WireMock.Net/wiki/Stubbing-and-Request-Matching#simulating-delays
@StefH commented on GitHub (Mar 5, 2018): 1. EMPTY_RESPONSE - I'll take a look 2. MALFORMED_RESPONSE_CHUNK - I'll take a look 3. Timeout - Would this help you ? https://github.com/WireMock-Net/WireMock.Net/wiki/Stubbing-and-Request-Matching#simulating-delays
Author
Owner

@MiguelAlho commented on GitHub (Mar 5, 2018):

I've been trying delay (response an extra second more then the amount of time i have for HttpClient timeout), but my instance o HttpClient seems to be receiving a 504 response than actually throwing the exception it's known to throw. I might need o up on the time on the delay to account for other factors.

@MiguelAlho commented on GitHub (Mar 5, 2018): I've been trying delay (response an extra second more then the amount of time i have for HttpClient timeout), but my instance o HttpClient seems to be receiving a 504 response than actually throwing the exception it's known to throw. I might need o up on the time on the delay to account for other factors.
Author
Owner

@StefH commented on GitHub (Mar 15, 2018):

  1. EMPTY_RESPONSE ; That's just returning an empty byte[] or string ? This is already supported I think?
  2. MALFORMED_RESPONSE_CHUNK ; that's just returning a byte[] or random length / random data ?
  3. I will take a look
@StefH commented on GitHub (Mar 15, 2018): 1. EMPTY_RESPONSE ; That's just returning an empty byte[] or string ? This is already supported I think? 2. MALFORMED_RESPONSE_CHUNK ; that's just returning a byte[] or random length / random data ? 3. I will take a look
Author
Owner

@MiguelAlho commented on GitHub (May 7, 2018):

(sorry for the delayed response). Yes, those seem to help. In the timeout case, I have figured out the problem to my approach, and fixed the setup. The delay setup on the mock server works correctly and is suficiente.

@MiguelAlho commented on GitHub (May 7, 2018): (sorry for the delayed response). Yes, those seem to help. In the timeout case, I have figured out the problem to my approach, and fixed the setup. The delay setup on the mock server works correctly and is suficiente.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#73