Best way to test failure conditions?

11 views
Skip to first unread message

Clint Kelly

unread,
Jun 8, 2018, 6:18:32 PM6/8/18
to Redis DB
Hi all! My team at work and I are building a Dropwizard service that talks to Redis.

We are using mock-jedis (https://github.com/50onRed/mock-jedis) for unit testing.

Does anyone know of a good way to test different error conditions (e.g., timeouts) with mock-jedis? Or with any other testing tool?

Our application naturally has code for handling timeouts, dropped connections, etc. We have some unit tests for that code, but I would feel better if I could simulate these error conditions with code outside of our application.

I used to work with Apache Cassandra and I recall there was a library (which I cannot find now) for Cassandra that allowed you to inject delays and errors between the Cassandra client and server so that you could test how your application handles those issues.

Would appreciate any help!

Best regards,
Clint
Reply all
Reply to author
Forward
0 new messages