You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Matteo Moci <mo...@gmail.com> on 2017/04/28 12:59:39 UTC

Re: Running Cassandra in Integration Tests

Sorry for bumping this old thread, but what would be your suggestion for
programmatically start/stop nodes in a cluster?

I'd like to make some experiments and perform QUORUM writes against a
cluster (REPLICATION=3) with alternatively 2 or 3 nodes up,
starting/stopping/restarting nodes in the middle, etc...  to understand the
behaviour.



On Fri, Oct 7, 2016 at 3:43 PM, Eric Stevens <mi...@gmail.com> wrote:

> If you happen to be using Scala, we recently released some tooling we
> wrote around using CCM for integration testing:
> https://github.com/protectwise/cassandra-util
>
> You define clusters and nodes in configuration, then ask the service to go:
> https://github.com/protectwise/cassandra-util/blob/master/ccm-testing-
> helper/src/main/scala/com/protectwise/testing/ccm/
> CassandraSetup.scala#L147
>
> It'll create your clusters and tear them down automatically when execution
> completes.
>
> On Thu, Oct 6, 2016 at 11:50 PM Edward Capriolo <ed...@gmail.com>
> wrote:
>
>> Checkout https://github.com/edwardcapriolo/farsandra. It falls under the
>> realm of almost 100% pure java (besides the fact it uses some shell to
>> launch Cassandra).
>>
>> On Thu, Oct 6, 2016 at 7:08 PM, Ali Akhtar <al...@gmail.com> wrote:
>>
>> Is it possible to create an isolated cassandra instance which is run
>> during integration tests and it disappears after tests have finished
>> running? Then its recreated the next time tests run (perhaps being
>> populated with test data).
>>
>>  I'm using Java.
>>
>>
>>
>>


-- 
Matteo Moci
http://mox.fm

Re: Running Cassandra in Integration Tests

Posted by kurt greaves <ku...@instaclustr.com>.
Use ccmlib. https://github.com/pcmanus/ccm

On 28 April 2017 at 12:59, Matteo Moci <mo...@gmail.com> wrote:

> Sorry for bumping this old thread, but what would be your suggestion for
> programmatically start/stop nodes in a cluster?
>
> I'd like to make some experiments and perform QUORUM writes against a
> cluster (REPLICATION=3) with alternatively 2 or 3 nodes up,
> starting/stopping/restarting nodes in the middle, etc...  to understand
> the behaviour.
>
>
>
> On Fri, Oct 7, 2016 at 3:43 PM, Eric Stevens <mi...@gmail.com> wrote:
>
>> If you happen to be using Scala, we recently released some tooling we
>> wrote around using CCM for integration testing:
>> https://github.com/protectwise/cassandra-util
>>
>> You define clusters and nodes in configuration, then ask the service to
>> go:
>> https://github.com/protectwise/cassandra-util/blob/master/
>> ccm-testing-helper/src/main/scala/com/protectwise/testing/
>> ccm/CassandraSetup.scala#L147
>>
>> It'll create your clusters and tear them down automatically when
>> execution completes.
>>
>> On Thu, Oct 6, 2016 at 11:50 PM Edward Capriolo <ed...@gmail.com>
>> wrote:
>>
>>> Checkout https://github.com/edwardcapriolo/farsandra. It falls under
>>> the realm of almost 100% pure java (besides the fact it uses some shell to
>>> launch Cassandra).
>>>
>>> On Thu, Oct 6, 2016 at 7:08 PM, Ali Akhtar <al...@gmail.com> wrote:
>>>
>>> Is it possible to create an isolated cassandra instance which is run
>>> during integration tests and it disappears after tests have finished
>>> running? Then its recreated the next time tests run (perhaps being
>>> populated with test data).
>>>
>>>  I'm using Java.
>>>
>>>
>>>
>>>
>
>
> --
> Matteo Moci
> http://mox.fm
>
>