I know, that it can simulate SocketTimeoutException
by using withFixedDelay
, but what about ConnectionTimeoutException
?
Yes it is possible to do this with WireMock by calling addDelayBeforeProcessingRequests(300)
against the Java API or posting the following to http://<host>:<port>/__admin/socket-delay
:
{ "milliseconds": 300 }
(Obviously replacing 300 with however many milliseconds you'd like to delay by)
addDelayBeforeProcessingRequests() doesn't seem to exist in 2.1.12. Is there an alternative?
what would be the json element for this ?