That article is a good starting point.  To make your life a bit easier,
consider checking out CassandraUnit that provides facilities to load
example data in a variety of ways.

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

Then you just need to be able to pass in which cassandra instance to
connect to before you execute your code (embedded versus external
environment).

On Mon, Jun 4, 2012 at 12:10 AM, Eran Chinthaka Withana <
eran.chinth...@gmail.com> wrote:

> Hi,
>
> I want to write integration tests related to my cassandra code where
> instead of accessing production clusters I should be able to start an
> embedded cassandra instance, within my unit test code, populate some data
> and run test cases.
>
> I found this[1]  as the closest to what I'm looking for (I prefer to use
> thrift API so didn't even think about using storage proxy API). I'm using
> Hector 1.0.x as my client to connect my cassandra 1.0.x clusters. Before I
> go ahead and use it, is this the recommended way to test Cassandra related
> client code? Are there any test utils already in Cassandra code base? I
> really appreciate if someone can shed some light here.
>
> [1]
> http://prettyprint.me/2010/02/14/running-cassandra-as-an-embedded-service/
>
> Thanks,
> Eran Chinthaka Withana
>

Reply via email to