Simulating connection timeout

2,095 views
Skip to first unread message

Andrew Barchuk

unread,
Jan 11, 2017, 11:13:51 AM1/11/17
to wiremo...@googlegroups.com
Hi,

It seems that in WireMock 1.x existed ways to simulate connection
timeout.
addRequestProcessingDelay
(http://one.wiremock.org/simulating-faults.html) and
addDelayBeforeProcessingRequest
(http://stackoverflow.com/a/32273162/2057275).
They are no longer available in the newer versions however. Are there
any
alternatives available to accomplish the same thing in WireMock 2.x?

Thanks in advance

---
Andrew

Tom Akehurst

unread,
Jan 11, 2017, 12:47:18 PM1/11/17
to wiremock-user, and...@raindev.io
That feature never really worked properly in 1.x, which is why it got removed. I haven't found a reliable way to do it yet unfortunately. Java's Socket implementation abstracts too much control away.

I tend to use local firewall rules to test these kinds of conditions when I need to now, or use https://github.com/tomakehurst/saboteur if I want to automate.
Reply all
Reply to author
Forward
0 new messages