jsevellec/cassandra-unit — pull request #17 by martindow (2012-06-03 20:35:02+00:00)
Title: CountDownLatch on startup + setting tmp directory

Hi,

Thanks for building CassandraUnit - have found it really useful test driving our Cassandra code!

I had two very minor issues, though, and have committed patched to fix them:

1. We were occasionally seeing our unit tests failing and I think it was when it took more than two seconds of the daemon to start up (usually when our build server was under heavy load). I've changed the code to use a CountDownLatch to wait until the startup is complete, which hopefully will make that problem go away. This will also make tests run quicker if it takes less than 2 seconds to start the daemon.

2. We use Gradle (check it out!), which by default writes things to the 'build' directory. So it was annoying to have a 'target/embeddedCassandra' directory. I've added a version of startEmbeddedCassandra which allows you to set that tmp directory.

Martin.