Peddi,

Thanks, does this start @ localhost, default port? And, mind sharing which
version of cassandra you use this with? will this work on 3.9, or on 3.7?

Also, why is the config in a temp location - wouldn't it be better to put
it in src/test/resources and try to specify that?

Thanks.

On Fri, Oct 7, 2016 at 6:17 AM, Peddi, Praveen <pe...@amazon.com> wrote:

> Honestly there isn’t much code to share. Here is the code (excluded
> exception handling). For yaml location, we have the classpathpath and write
> to temp location everytime.
>
> System.setProperty("cassandra.config", "file://" + YAML_LOCATION);
> cassandraDaemon = new CassandraDaemon();
>  cassandraDaemon.init(null);
> cassandraDaemon.start();
>
> //stop cassandra after tests are done
> cassandraDaemon.stop();
>
> From: Ali Akhtar <ali.rac...@gmail.com>
> Reply-To: "user@cassandra.apache.org" <user@cassandra.apache.org>
> Date: Thursday, October 6, 2016 at 8:44 PM
>
> To: "user@cassandra.apache.org" <user@cassandra.apache.org>
> Subject: Re: Running Cassandra in Integration Tests
>
> Peddi @ Amazon, would you be able to share your code such as in a gist, if
> possible, please?
>
> Also, which version of cassandra are you doing that with?
>
>
>
> On Fri, Oct 7, 2016 at 5:41 AM, Peddi, Praveen <pe...@amazon.com> wrote:
>
>> We could not use cassandra unit for licensing reasons so we ended up
>> instantiate CassandraDeamon after setting system property of
>> cassandra.config={yaml location}. It works fine for our needs.
>>
>> Praveen
>>
>> From: Ali Akhtar <ali.rac...@gmail.com>
>> Reply-To: "user@cassandra.apache.org" <user@cassandra.apache.org>
>> Date: Thursday, October 6, 2016 at 8:35 PM
>> To: "user@cassandra.apache.org" <user@cassandra.apache.org>
>> Subject: Re: Running Cassandra in Integration Tests
>>
>> That looks great Andrew, but it doesn't seem to have been committed to
>> for 5 months. Is anyone still using cassandra-unit , does it work with
>> latest cassandra versions (e.g 3.9)?
>>
>> On Fri, Oct 7, 2016 at 5:33 AM, Andrew Tolbert <
>> andrew.tolb...@datastax.com> wrote:
>>
>>> Hi Ali,
>>>
>>> cassandra-unit <https://github.com/jsevellec/cassandra-unit> might be
>>> what you are looking for.  It allows you to run an embedded cassandra
>>> instance along side your tests and has some nice integration with JUnit.
>>>
>>> Thanks,
>>> Andy
>>>
>>> On Thu, Oct 6, 2016 at 7:13 PM Ali Akhtar <ali.rac...@gmail.com> wrote:
>>>
>>>> Ok, but that's not what this question is about.
>>>>
>>>> I'm looking for a way to run an embedded cassandra instance which is
>>>> created & destroyed during tests and which doesn't persist any state
>>>> outside the tests.
>>>>
>>>>
>>>> On Fri, Oct 7, 2016 at 5:10 AM, Kant Kodali <k...@peernova.com> wrote:
>>>>
>>>> you dont need to look for cassandra java api to start/stop instance.
>>>> you just need to write a shell script or python or java or any language to
>>>> execute shell commands!
>>>>
>>>>
>>>>
>>>> On Thu, Oct 6, 2016 4:57 PM, Ali Akhtar ali.rac...@gmail.com wrote:
>>>>
>>>> Okay.. but how would I start this instance? Is there a java api to
>>>> programmatically start / destroy an instance during tests?
>>>>
>>>> On Fri, Oct 7, 2016 at 4:56 AM, Kant Kodali <k...@peernova.com> wrote:
>>>>
>>>> sure as long as that isolated instance is treated as separate cluster
>>>> you shouldn't run into any problems.
>>>>
>>>>
>>>>
>>>> On Thu, Oct 6, 2016 4:08 PM, Ali Akhtar ali.rac...@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.
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>

Reply via email to