Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2724

Fix InProcessCassandraServer to really shutdown all active Threads

    XMLWordPrintableJSON

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); }
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            ronthijssen Ron Thijssen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: