cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang <teddyyyy...@gmail.com>
Subject caution for restarting CassandraDaemon in junit
Date Thu, 09 Jun 2011 19:36:30 GMT
I'm doing a bunch of tests for my code that uses Cassandra.

I have 2 test classes, each of them sets up a thrift.CassandraDaemon  in
@BeforeClass  and activate it in @AfterClass

when I ran them separately , they both work fine; if I run them together by
"mvn test", the latter one fails.

it turns out that after "deactivate()" , the static caches for implementing
singleton in Table  is not cleared,
so they are re-used. there could be more cases like this.

so to get that working, you need to set the "forkMode" of surefire-plugin to
let each test class be run in a separate JVM





yang

Mime
View raw message