DATACASS-70 - Fixed Table Lifecycle test with new Unit test strategy.
This commit is contained in:
@@ -81,7 +81,11 @@ public abstract class AbstractEmbeddedCassandraIntegrationTest {
|
||||
}
|
||||
|
||||
public void connect() {
|
||||
|
||||
if (connect && !connected()) {
|
||||
|
||||
log.info("Connecting to Cassandra");
|
||||
|
||||
cluster = cluster();
|
||||
|
||||
if (keyspace() == null) {
|
||||
|
||||
@@ -18,6 +18,9 @@ package org.springframework.cassandra.test.integration.core.cql.generator;
|
||||
import static org.springframework.cassandra.test.integration.core.cql.generator.CqlTableSpecificationAssertions.assertNoTable;
|
||||
import static org.springframework.cassandra.test.integration.core.cql.generator.CqlTableSpecificationAssertions.assertTable;
|
||||
|
||||
import org.cassandraunit.CassandraCQLUnit;
|
||||
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -39,6 +42,18 @@ public class TableLifecycleIntegrationTest extends AbstractEmbeddedCassandraInte
|
||||
|
||||
CreateTableCqlGeneratorTests.MultipleOptionsTest createTableTest = new CreateTableCqlGeneratorTests.MultipleOptionsTest();
|
||||
|
||||
public TableLifecycleIntegrationTest() {
|
||||
super("tlit");
|
||||
clear = true;
|
||||
}
|
||||
|
||||
// This only ensures the keyspace exists before each test, while using a static session from the parent object.
|
||||
// TODO - DW Make this better.
|
||||
@Rule
|
||||
public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet(
|
||||
"cassandraOperationsTest-cql-dataload.cql", this.keyspace), CASSANDRA_CONFIG, CASSANDRA_HOST,
|
||||
CASSANDRA_NATIVE_PORT);
|
||||
|
||||
@Test
|
||||
public void testDrop() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user