You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kevin Burton <bu...@spinn3r.com> on 2014/06/12 05:02:56 UTC

embedding cassandra in junit ..

Maybe this is an anti-pattern.. please feel free to flame me if that's the
case ;)

I'd like to embed cassandra in junit so that I can test my database code
from my laptop and also get it working in our integration.

The general idea is to start with a clean slate, run cassandra, create
tables, simulate production load, then shutdown.

This page:

http://wiki.apache.org/cassandra/Embedding

seems to hint that it's possible.

of course.. there are some tests here that make it more complicated - like
quorum read.  but for right now I'll settle for one replica.

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
Skype: *burtonator*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>
War is peace. Freedom is slavery. Ignorance is strength. Corporations are
people.

Re: embedding cassandra in junit ..

Posted by James Carman <ja...@carmanconsulting.com>.
These are the maven coordinates:

http://search.maven.org/#artifactdetails%7Corg.cassandraunit%7Ccassandra-unit%7C2.0.2.1%7Cjar



On Thu, Jun 12, 2014 at 1:40 PM, Kevin Burton <bu...@spinn3r.com> wrote:

> Ah.. nice!  I assume you mean this?
>
> https://github.com/jsevellec/cassandra-unit
>
> This should be awesome :)
>
>
> On Wed, Jun 11, 2014 at 8:08 PM, Johan Edstrom <se...@gmail.com> wrote:
>
>> Cassandra-unit 2.0X works awesomely,
>> if you are willing to spend the slightly few more cycles, - Look at
>> farsandra. :)
>>
>> I copied Farsandra (since there was no release) into hecate.
>>
>> On Jun 11, 2014, at 11:02 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>>
>> > Maybe this is an anti-pattern.. please feel free to flame me if that's
>> the case ;)
>> >
>> > I'd like to embed cassandra in junit so that I can test my database
>> code from my laptop and also get it working in our integration.
>> >
>> > The general idea is to start with a clean slate, run cassandra, create
>> tables, simulate production load, then shutdown.
>> >
>> > This page:
>> >
>> > http://wiki.apache.org/cassandra/Embedding
>> >
>> > seems to hint that it's possible.
>> >
>> > of course.. there are some tests here that make it more complicated -
>> like quorum read.  but for right now I'll settle for one replica.
>> >
>> > --
>> >
>> > Founder/CEO Spinn3r.com
>> > Location: San Francisco, CA
>> > Skype: burtonator
>> > blog: http://burtonator.wordpress.com
>> > … or check out my Google+ profile
>> >
>> > War is peace. Freedom is slavery. Ignorance is strength. Corporations
>> are people.
>> >
>>
>>
>
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> Skype: *burtonator*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>  War is peace. Freedom is slavery. Ignorance is strength. Corporations
> are people.
>
>

Re: embedding cassandra in junit ..

Posted by Kevin Burton <bu...@spinn3r.com>.
Ah.. nice!  I assume you mean this?

https://github.com/jsevellec/cassandra-unit

This should be awesome :)


On Wed, Jun 11, 2014 at 8:08 PM, Johan Edstrom <se...@gmail.com> wrote:

> Cassandra-unit 2.0X works awesomely,
> if you are willing to spend the slightly few more cycles, - Look at
> farsandra. :)
>
> I copied Farsandra (since there was no release) into hecate.
>
> On Jun 11, 2014, at 11:02 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>
> > Maybe this is an anti-pattern.. please feel free to flame me if that's
> the case ;)
> >
> > I'd like to embed cassandra in junit so that I can test my database code
> from my laptop and also get it working in our integration.
> >
> > The general idea is to start with a clean slate, run cassandra, create
> tables, simulate production load, then shutdown.
> >
> > This page:
> >
> > http://wiki.apache.org/cassandra/Embedding
> >
> > seems to hint that it's possible.
> >
> > of course.. there are some tests here that make it more complicated -
> like quorum read.  but for right now I'll settle for one replica.
> >
> > --
> >
> > Founder/CEO Spinn3r.com
> > Location: San Francisco, CA
> > Skype: burtonator
> > blog: http://burtonator.wordpress.com
> > … or check out my Google+ profile
> >
> > War is peace. Freedom is slavery. Ignorance is strength. Corporations
> are people.
> >
>
>


-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
Skype: *burtonator*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>
War is peace. Freedom is slavery. Ignorance is strength. Corporations are
people.

Re: embedding cassandra in junit ..

Posted by Johan Edstrom <se...@gmail.com>.
Cassandra-unit 2.0X works awesomely, 
if you are willing to spend the slightly few more cycles, - Look at farsandra. :)

I copied Farsandra (since there was no release) into hecate.

On Jun 11, 2014, at 11:02 PM, Kevin Burton <bu...@spinn3r.com> wrote:

> Maybe this is an anti-pattern.. please feel free to flame me if that's the case ;)
> 
> I'd like to embed cassandra in junit so that I can test my database code from my laptop and also get it working in our integration.
> 
> The general idea is to start with a clean slate, run cassandra, create tables, simulate production load, then shutdown.
> 
> This page:
> 
> http://wiki.apache.org/cassandra/Embedding
> 
> seems to hint that it's possible.  
> 
> of course.. there are some tests here that make it more complicated - like quorum read.  but for right now I'll settle for one replica.
> 
> -- 
> 
> Founder/CEO Spinn3r.com
> Location: San Francisco, CA
> Skype: burtonator
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> 
> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
> 


Re: embedding cassandra in junit ..

Posted by James Carman <ja...@carmanconsulting.com>.
Take a look at cassandra-unit.

https://github.com/savoirtech/hecate/blob/master/hecate-cql3/src/test/java/com/savoirtech/hecate/cql3/test/CassandraTestCase.java



On Wed, Jun 11, 2014 at 11:02 PM, Kevin Burton <bu...@spinn3r.com> wrote:

> Maybe this is an anti-pattern.. please feel free to flame me if that's the
> case ;)
>
> I'd like to embed cassandra in junit so that I can test my database code
> from my laptop and also get it working in our integration.
>
> The general idea is to start with a clean slate, run cassandra, create
> tables, simulate production load, then shutdown.
>
> This page:
>
> http://wiki.apache.org/cassandra/Embedding
>
> seems to hint that it's possible.
>
> of course.. there are some tests here that make it more complicated - like
> quorum read.  but for right now I'll settle for one replica.
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> Skype: *burtonator*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
> War is peace. Freedom is slavery. Ignorance is strength. Corporations are
> people.
>
>