Cassandra As An Embedded Service

by Alex Popescu

With the help of the community I’ve built an embedded cassandra service ideal for unit testing and perhaps other uses. I’ve also built a cleanup utility that helps wipe out all data before the service starts running so the combination of both provides isolation etc. Now each test process runs an in-process, embedded instance of cassandra.

While I do agree with the main goal behind this initiative (i.e. testability), I do think that a stub solution (take for example RockingChair a Ruby stub library for CouchDB) would be a much better fit and would perform a lot better. As the original post mentions, the embedded Cassandra service requires each test to be run in a separate JVM and as you can imagine that will be far from being quick.