cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gabriele renzi <>
Subject Re: How to unit test my code calling Cassandra with Thift
Date Wed, 20 Jan 2010 17:48:50 GMT
On Wed, Jan 20, 2010 at 4:39 PM, Josh <> wrote:
> I havn't done this in java but so this may sound .netish but:
> When I'm writing unit tests for stuff like this I usually mock the
> datastore.  A quick google search makes me think thrift would be pretty easy
> to mock here.  That removes the complexity of getting a cassandra instance
> in place for your unit tests and keeping it up to date with your application
> version of cassandra.
> jMock ( seems like a place to start but again:  Not
> much of a java programmer so ask somebody who knows what they're talking
> about.

I am a fond user of mockito myself ( and it's good
for testing code interfacing with the db,
But if the subsystem under test is the database
(driver/connection/logic) I believe testing with an embedded/temp
server is better.

So, I second the op question :)

View raw message