public abstract class EmbeddedCassandraConnectorTestBase extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
STARTUP_TIMEOUT_IN_SECONDS |
static String |
TEST_CASSANDRA_HOSTS |
static int |
TEST_CASSANDRA_PORT |
static String |
TEST_CASSANDRA_YAML_CONFIG |
static String |
TEST_CONNECTOR_NAME |
static String |
TEST_KAFKA_SERVERS |
static String |
TEST_KAFKA_TOPIC_PREFIX |
static String |
TEST_KEYSPACE |
static String |
TEST_SCHEMA_REGISTRY_URL |
| Constructor and Description |
|---|
EmbeddedCassandraConnectorTestBase() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
clearCommitLogFromDirectory(File directory,
boolean recursive)
Delete all commit log files in directory
|
private static void |
createTestKeyspace() |
protected static void |
deleteTestKeyspaceTables()
Drop all tables in TEST_KEYSPACE
|
protected static void |
deleteTestOffsets(io.debezium.connector.cassandra.CassandraConnectorContext context)
Delete all files in offset backing store directory
|
private static void |
destroyTestKeyspace() |
protected static File |
generateCommitLogFile()
Generate a commit log file with current timestamp in memory
|
protected static Properties |
generateDefaultConfigMap() |
protected static io.debezium.connector.cassandra.CassandraConnectorContext |
generateTaskContext()
Generate a task context with default test configs
|
protected static io.debezium.connector.cassandra.CassandraConnectorContext |
generateTaskContext(Map<String,Object> configs)
General a task context with default and custom test configs
|
protected static String |
keyspaceTable(String tableName)
Return the full name of the test table in the form of
|
protected static void |
populateFakeCommitLogsForDirectory(int numOfFiles,
File directory)
Generate commit log files in directory
|
static void |
setUpClass() |
private static void |
startEmbeddedCassandra() |
private static void |
stopEmbeddedCassandra() |
static void |
tearDownClass() |
protected static void |
truncateTestKeyspaceTableData()
Truncate data in all tables in TEST_KEYSPACE, but do not drop the tables
|
public static final String TEST_CONNECTOR_NAME
public static final String TEST_KEYSPACE
public static final long STARTUP_TIMEOUT_IN_SECONDS
public static final String TEST_CASSANDRA_YAML_CONFIG
public static final String TEST_CASSANDRA_HOSTS
public static final int TEST_CASSANDRA_PORT
public static final String TEST_KAFKA_SERVERS
public static final String TEST_SCHEMA_REGISTRY_URL
public static final String TEST_KAFKA_TOPIC_PREFIX
public static void tearDownClass()
protected static void truncateTestKeyspaceTableData()
protected static void deleteTestKeyspaceTables()
protected static io.debezium.connector.cassandra.CassandraConnectorContext generateTaskContext()
throws Exception
Exceptionprotected static io.debezium.connector.cassandra.CassandraConnectorContext generateTaskContext(Map<String,Object> configs) throws Exception
Exceptionprotected static void deleteTestOffsets(io.debezium.connector.cassandra.CassandraConnectorContext context)
throws IOException
IOExceptionprotected static String keyspaceTable(String tableName)