How to automate network dropouts? More details in description.

I need to write some java code that has network resiliency. In more simple terms, the code performs a sequence of actions, lets say step A, step B, step C. Each step involves a network call to a server and transferring data, and this is the important part, in case any step fails with a connection exception, I need the code to keep trying to establish connection, and when the connection is finally established, I need to run a few checks to roll back any changes that might have occurred if the network drop occurred halfway through the data transfer, and then attempt that step again.

This is not about the code. what I'm wondering is how to test this code? Can I run my application in a docker container and do something to drop the connection to the container automatically when I want to and bring it back up again? I've been looking for a while but nothing useful has come up.

submitted by /u/seathbydnudnu
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/3lYSJld

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close