This question came up today:

OK, say you mock, how do you construct a working multi-process
representation of how C* actually works from within a unit test without
running the code that actually constructs the cluster?

1) Don't do that (construct a multinode cluster in a test) just mock the
crap out of it.

http://www.baeldung.com/mockito-verify

2) dtests
Dtest don't actually do this in the classic sense. One challenge is
code-coverage. For many projects I use cobertura.
http://www.mojohaus.org/cobertura-maven-plugin/. Cobertura can't (as far as
know) can not instrument N JVMs and give you coverage. Bringing up a full
on cluster to test something is slow, compute intensive, and quite hard.

3) Fix it
https://issues.apache.org/jira/browse/CASSANDRA-7837
https://issues.apache.org/jira/browse/CASSANDRA-10283

*Impossible you say!  No NoSQL JAVA DATABASE CAN DO THIS!!!*

https://www.elastic.co/guide/en/elasticsearch/reference/current/integration-tests.html

Wouldn't that be just the bees knees???

Reply via email to