Fix InProcessCassandraServer to really shutdown all active Threads
------------------------------------------------------------------

                 Key: CASSANDRA-2724
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2724
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 0.7.6
            Reporter: Ron Thijssen


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:
{quote} public static void main(String[] args) throws Exception \{
                helper = new EmbeddedServerHelper("/cassandra.yaml");
                helper.setup();
                Thread.currentThread().sleep(3000);
                helper.teardown();
        \}{quote}

Or by creating two JUnit test classes and execute them, e.g.:  
{quote}
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); \}
\}
{quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to