Groups
Sign in
Groups
wiremock-user
Conversations
About
Send feedback
Help
Is it possible to simulate connection timeout?
2,119 views
Skip to first unread message
Mr.Black
unread,
May 11, 2015, 6:54:32 AM
5/11/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremo...@googlegroups.com
I know, that it can simulate SocketTimeoutException by using
withFixedDelay
, but what about ConnectionTimeoutException?
Thanks for the answers.
Tom Akehurst
unread,
May 11, 2015, 5:11:32 PM
5/11/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremo...@googlegroups.com, sfed...@griddynamics.com
WireMock.addRequestProcessingDelay() is what you're looking for. That inserts the delay before the socket.accept() call.
ash...@tibco.com
unread,
Jan 14, 2019, 8:00:48 PM
1/14/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
addRequestProcessingDelay seems to have disappeared without replacement in version 2.x ?
Is there any alternative?
Thank you in advance
Tom Akehurst
unread,
Jan 15, 2019, 12:51:38 PM
1/15/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
I've not yet found a way to do this reliably in newer Java releases (which is why I removed it between v1 and 2).
The best substitute I've found is iptables/nc or tools based on them. I wrote this to help with this a bit:
https://github.com/tomakehurst/saboteur/
Reply all
Reply to author
Forward
0 new messages