Utsav
Utsav

Reputation: 566

How to test code that uses DSE Cassandra/Solr?

I am working on an application where we are interfacing with Datastax Enterprise edition (we are auto syncing with solr).

I was wondering how can this application be efficiently tested.

I was considering embedded cassandra for testing but the caveat there is that we are using solr_query to query Cassandra.

The alternative is to setup a test keyspace in the real node and run the tests using that keyspace.

But I would like to write functional test cases that has no dependency on the real cassandra database.

I would like to know about the best practices that people follow to handle such scenarios.

Cheers,

Utsav

Upvotes: 1

Views: 322

Answers (1)

phact
phact

Reputation: 7305

The DataStax java driver does this type of thing using CCM. CCM is a tool to stand up / simulate a small cluster (both DSE and OSS C* are supported) on a single machine.

Check out their code here https://github.com/datastax/java-driver/tree/3.x/testing

Upvotes: 0

Related Questions