Java Code Examples for org.cassandraunit.utils.EmbeddedCassandraServerHelper#cleanEmbeddedCassandra()

The following examples show how to use org.cassandraunit.utils.EmbeddedCassandraServerHelper#cleanEmbeddedCassandra() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ColumnFamilyApp.java    From tutorials with MIT License 6 votes vote down vote up
public static void main(String... args) throws Exception {

        EmbeddedCassandraServerHelper.startEmbeddedCassandra();

        ColumnConfiguration configuration = new CassandraConfiguration();
        try(ColumnFamilyManagerFactory entityManagerFactory = configuration.get()) {
            ColumnFamilyManager entityManager = entityManagerFactory.get(KEY_SPACE);
            ColumnEntity columnEntity = ColumnEntity.of(COLUMN_FAMILY);
            Column key = Columns.of("id", 10L);
            Column name = Columns.of("name", "JNoSQL in Acion");
            columnEntity.add(key);
            columnEntity.add(name);
            ColumnEntity saved = entityManager.insert(columnEntity);
            System.out.println(saved);
        }

        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
        EmbeddedCassandraServerHelper.stopEmbeddedCassandra();
    }
 
Example 2
Source File: Cassandra4Test.java    From java-specialagent with Apache License 2.0 5 votes vote down vote up
@After
public void after() {
  try {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
  }
  catch (final Exception e) {
    logger.log(Level.WARNING, e.getMessage(), e);
  }
}
 
Example 3
Source File: CassandraClientTestBase.java    From vertx-cassandra-client with Apache License 2.0 5 votes vote down vote up
@After
public void tearDown(TestContext testContext) {
  final Async async = testContext.async();
  client.close(testContext.asyncAssertSuccess(close -> async.countDown()));
  async.await();
  EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
  vertx.close(testContext.asyncAssertSuccess());
}
 
Example 4
Source File: CassandraTest.java    From java-specialagent with Apache License 2.0 5 votes vote down vote up
@After
public void after() {
  if (isJdkSupported) {
    try {
      EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }
    catch (final Exception e) {
      logger.log(Level.WARNING, e.getMessage(), e);
    }
  }
}
 
Example 5
Source File: CassandraIntegrationTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Override
public void tearDown(ManagementClient managementClient, String containerId) throws Exception {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 6
Source File: SpringContextTest.java    From tutorials with MIT License 4 votes vote down vote up
@AfterClass
public static void stopCassandraEmbedded() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 7
Source File: BookRepositoryIntegrationTest.java    From tutorials with MIT License 4 votes vote down vote up
@AfterClass
public static void stopCassandraEmbedded() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 8
Source File: CqlQueriesIntegrationTest.java    From tutorials with MIT License 4 votes vote down vote up
@AfterClass
public static void stopCassandraEmbedded() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 9
Source File: CassandraTemplateIntegrationTest.java    From tutorials with MIT License 4 votes vote down vote up
@AfterClass
public static void stopCassandraEmbedded() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 10
Source File: BookRepositoryIntegrationTest.java    From tutorials with MIT License 4 votes vote down vote up
@AfterClass
public static void cleanup() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 11
Source File: KeyspaceRepositoryIntegrationTest.java    From tutorials with MIT License 4 votes vote down vote up
@AfterClass
public static void cleanup() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 12
Source File: CassandraJUnitRule.java    From cassandra-migration with MIT License 4 votes vote down vote up
@Override
protected void after() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 13
Source File: AbstractCassandraTest.java    From gpmr with Apache License 2.0 4 votes vote down vote up
@AfterClass
public static void cleanupServer() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 14
Source File: _AbstractCassandraTest.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 4 votes vote down vote up
@AfterClass
public static void cleanupServer() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 15
Source File: EmbeddedCassandra.java    From conductor with Apache License 2.0 4 votes vote down vote up
public void cleanupData() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}
 
Example 16
Source File: TitusCassandraResource.java    From titus-control-plane with Apache License 2.0 4 votes vote down vote up
public void cleanAll() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    session = null;
}
 
Example 17
Source File: EmbeddedCassandraConnectorTestBase.java    From debezium-incubator with Apache License 2.0 4 votes vote down vote up
private static void stopEmbeddedCassandra() {
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
}