You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Bhuvan Rawal <bh...@gmail.com> on 2016/09/24 14:51:09 UTC

Reproducing exception in cassandra for testing failover scenarios

Hi,

Is there a way to produce exceptions like NoHostAvailable, Timeout
exceptions , Not Enough replicas available, etc. locally so as to test the
failover code written at application level (paging state reinjection, or
retries).

Thanks & Regards,
Bhuvan

Re: Reproducing exception in cassandra for testing failover scenarios

Posted by Edward Capriolo <ed...@gmail.com>.
You can also look at ccmbridge and farsandra.

Here is an example of bringing up an 8 node 3 datacenter cluster in a
single unit test using farsandra.

https://github.com/edwardcapriolo/ec/blob/master/src/test/java/Base/ThreeDcTest.java

On Sat, Sep 24, 2016 at 3:53 PM, Jonathan Haddad <jo...@jonhaddad.com> wrote:

> Have you looked at Stubbed Cassandra, by Chris Batey?
> http://www.scassandra.org/
>
> On Sat, Sep 24, 2016 at 7:51 AM Bhuvan Rawal <bh...@gmail.com> wrote:
>
>> Hi,
>>
>> Is there a way to produce exceptions like NoHostAvailable, Timeout
>> exceptions , Not Enough replicas available, etc. locally so as to test the
>> failover code written at application level (paging state reinjection, or
>> retries).
>>
>> Thanks & Regards,
>> Bhuvan
>>
>

Re: Reproducing exception in cassandra for testing failover scenarios

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
Have you looked at Stubbed Cassandra, by Chris Batey?
http://www.scassandra.org/

On Sat, Sep 24, 2016 at 7:51 AM Bhuvan Rawal <bh...@gmail.com> wrote:

> Hi,
>
> Is there a way to produce exceptions like NoHostAvailable, Timeout
> exceptions , Not Enough replicas available, etc. locally so as to test the
> failover code written at application level (paging state reinjection, or
> retries).
>
> Thanks & Regards,
> Bhuvan
>