Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Invalid
-
None
-
None
-
None
-
Normal
Description
The InProcessCassandraServer class does not completely shut down the Cassandra Server when shutdown() is called.
This prevents multiple unit test classes to be executed without using JVM fork.
It also prevents completing Fitnesse testcases since the execution never completes.
This issue is related to CASSANDRA-782 and CASSANDRA-740
This state can be reproduced by running the following:
public static void main(String[] args) throws Exception {
helper = new EmbeddedServerHelper("/cassandra.yaml");
helper.setup();
Thread.currentThread().sleep(3000);
helper.teardown();
}
Or by creating two JUnit test classes and execute them, e.g.:
public class FirstInmemoryTest {
private static EmbeddedServerHelper helper;
@BeforeClass
public static void setup() throws Exception {
helper = new EmbeddedServerHelper("/cassandra.yaml");
helper.setup();
}
@AfterClass
public static void shutdown() { helper.teardown(); }
@Test
public void testSomething() { assertTrue(true); }
}public class SecondInmemoryTest {
private static EmbeddedServerHelper helper;
@BeforeClass
public static void setup() throws Exception {
helper = new EmbeddedServerHelper("/cassandra.yaml");
helper.setup();
}
@AfterClass
public static void shutdown() { helper.teardown(); }
@Test
public void testSomething() { assertTrue(true); }
}