DBZ-5043 Rename DB_HISTORY_PATH to SCHEMA_HISTORY_PATH

This commit is contained in:
Vojtech Juranek 2022-09-06 14:18:17 +02:00 committed by Jiri Pechanec
parent b6c31f3da5
commit b797201263
81 changed files with 247 additions and 247 deletions

View File

@ -35,11 +35,11 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "DDL uses fractional second data types, not supported until MySQL 5.6")
public class BinlogReaderBufferIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "connector_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private final UniqueDatabase RO_DATABASE = new UniqueDatabase("myServer2", "connector_test_ro", DATABASE)
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -49,7 +49,7 @@ public void beforeEach() {
DATABASE.createAndInitialize();
RO_DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -58,7 +58,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}
@ -86,7 +86,7 @@ public void shouldCorrectlyManageRollback() throws SQLException, InterruptedExce
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(MySqlConnectorConfig.BUFFER_SIZE_FOR_BINLOG_READER, 10_000)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...
@ -153,7 +153,7 @@ public void shouldProcessSavepoint() throws SQLException, InterruptedException {
.with(MySqlConnectorConfig.DATABASE_INCLUDE_LIST, DATABASE.getDatabaseName())
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...
@ -215,7 +215,7 @@ public void shouldProcessLargeTransaction() throws SQLException, InterruptedExce
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(MySqlConnectorConfig.BUFFER_SIZE_FOR_BINLOG_READER, 9)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...
@ -285,7 +285,7 @@ public void shouldProcessRolledBackSavepoint() throws SQLException, InterruptedE
.with(MySqlConnectorConfig.DATABASE_INCLUDE_LIST, DATABASE.getDatabaseName())
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...

View File

@ -42,14 +42,14 @@
public class IncrementalSnapshotIT extends AbstractIncrementalSnapshotWithSchemaChangesSupportTest<MySqlConnector> {
protected static final String SERVER_NAME = "is_test";
protected final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "incremental_snapshot-test").withDbHistoryPath(DB_HISTORY_PATH);
protected final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "incremental_snapshot-test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
@Before
public void before() throws SQLException {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -58,7 +58,7 @@ public void after() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -26,7 +26,7 @@
*/
public class MultiTableStatementIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt")
.toAbsolutePath();
private UniqueDatabase DATABASE;
@ -36,11 +36,11 @@ public class MultiTableStatementIT extends AbstractConnectorTest {
public void beforeEach() {
stopConnector();
DATABASE = new UniqueDatabase("multitable", "multitable_dbz_871")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -49,7 +49,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -30,10 +30,10 @@
*/
public class MySqlBinaryModeIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-binary-mode.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-binary-mode.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("binarymodeit", "binary_mode_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -42,7 +42,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -51,7 +51,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -66,11 +66,11 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "DDL uses fractional second data types, not supported until MySQL 5.6")
public class MySqlConnectorIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "connector_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private final UniqueDatabase RO_DATABASE = new UniqueDatabase("myServer2", "connector_test_ro", DATABASE)
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
// Defines how many initial events are generated from loading the test databases.
private static final int PRODUCTS_TABLE_EVENT_COUNT = 9;
@ -85,7 +85,7 @@ public void beforeEach() {
DATABASE.createAndInitialize();
RO_DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -94,7 +94,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}
@ -107,7 +107,7 @@ public void shouldNotStartWithInvalidConfiguration() {
.with(AbstractTopicNamingStrategy.TOPIC_PREFIX, "myserver")
.with(KafkaSchemaHistory.TOPIC, "myserver")
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// we expect the engine will log at least one error, so preface it ...
@ -123,7 +123,7 @@ public void shouldNotStartWithInvalidConfiguration() {
public void shouldFailToValidateInvalidConfiguration() {
Configuration config = Configuration.create()
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
MySqlConnector connector = new MySqlConnector();
Config result = connector.validate(config.asMap());
@ -288,7 +288,7 @@ private void shouldConsumeAllEventsFromDatabaseUsingSnapshotByField(Field dbIncl
.with(dbIncludeListField, DATABASE.getDatabaseName())
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...
@ -704,7 +704,7 @@ public void shouldUseOverriddenSelectStatementDuringSnapshotting() throws SQLExc
.with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, true)
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...
@ -754,7 +754,7 @@ public void shouldUseMultipleOverriddenSelectStatementsDuringSnapshotting() thro
String.format("SELECT * from %s.products_on_hand where product_id>=108 order by product_id", DATABASE.getDatabaseName()))
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(MySqlConnectorConfig.INCLUDE_SCHEMA_CHANGES, true)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.build();
// Start the connector ...
@ -783,7 +783,7 @@ public void shouldUseMultipleOverriddenSelectStatementsDuringSnapshotting() thro
@Test
@FixFor("DBZ-977")
public void shouldIgnoreAlterTableForNonCapturedTablesNotStoredInHistory() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.customers", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -820,7 +820,7 @@ public void shouldIgnoreAlterTableForNonCapturedTablesNotStoredInHistory() throw
@Test
@FixFor("DBZ-1201")
public void shouldSaveSetCharacterSetWhenStoringOnlyCapturededTables() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
config = DATABASE.defaultConfig()
.with(MySqlConnectorConfig.DATABASE_INCLUDE_LIST, "no_" + DATABASE.getDatabaseName())
@ -843,7 +843,7 @@ public void shouldSaveSetCharacterSetWhenStoringOnlyCapturededTables() throws SQ
@Test
@FixFor("DBZ-1246")
public void shouldProcessCreateUniqueIndex() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.migration_test", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -894,7 +894,7 @@ public void shouldProcessCreateUniqueIndex() throws SQLException, InterruptedExc
@Test
@FixFor("DBZ-977")
public void shouldIgnoreAlterTableForNonCapturedTablesStoredInHistory() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.customers", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -932,7 +932,7 @@ public void shouldIgnoreAlterTableForNonCapturedTablesStoredInHistory() throws S
@Test
@FixFor("DBZ-1264")
public void shouldIgnoreCreateIndexForNonCapturedTablesNotStoredInHistory() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.customers", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -971,7 +971,7 @@ public void shouldIgnoreCreateIndexForNonCapturedTablesNotStoredInHistory() thro
@Test
@FixFor("DBZ-683")
public void shouldReceiveSchemaForNonWhitelistedTablesAndDatabases() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.customers,%s.orders", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -1009,7 +1009,7 @@ public void shouldReceiveSchemaForNonWhitelistedTablesAndDatabases() throws SQLE
@Test
@FixFor("DBZ-1546")
public void shouldHandleIncludeListTables() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.customers, %s.orders", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -1035,7 +1035,7 @@ public void shouldHandleIncludeListTables() throws SQLException, InterruptedExce
@Test
public void shouldHandleIncludedTables() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tables = String.format("%s.customers, %s.orders", DATABASE.getDatabaseName(), DATABASE.getDatabaseName());
config = DATABASE.defaultConfig()
@ -1118,7 +1118,7 @@ private Struct getAfter(SourceRecord record) {
@Test
public void shouldConsumeEventsWithNoSnapshot() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
// Use the DB configuration to define the connector's configuration ...
config = RO_DATABASE.defaultConfig()
@ -1164,7 +1164,7 @@ public void shouldConsumeEventsWithNoSnapshot() throws SQLException, Interrupted
@Test
@FixFor("DBZ-1962")
public void shouldConsumeEventsWithIncludedColumns() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
// Use the DB configuration to define the connector's configuration ...
config = RO_DATABASE.defaultConfig()
@ -1211,7 +1211,7 @@ public void shouldConsumeEventsWithIncludedColumns() throws SQLException, Interr
@Test
@FixFor("DBZ-2525")
public void shouldConsumeEventsWithIncludedColumnsForKeywordNamedTable() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
try (MySqlTestConnection db = MySqlTestConnection.forTestDatabase(RO_DATABASE.getDatabaseName())) {
try (JdbcConnection connection = db.connect()) {
@ -1269,7 +1269,7 @@ public void shouldConsumeEventsWithIncludedColumnsForKeywordNamedTable() throws
@Test
public void shouldConsumeEventsWithMaskedAndBlacklistedColumns() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
// Use the DB configuration to define the connector's configuration ...
config = RO_DATABASE.defaultConfig()
@ -1325,7 +1325,7 @@ public void shouldConsumeEventsWithMaskedAndBlacklistedColumns() throws SQLExcep
@Test
@FixFor("DBZ-1692")
public void shouldConsumeEventsWithMaskedHashedColumns() throws InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
// Use the DB configuration to define the connector's configuration ...
config = RO_DATABASE.defaultConfig()
@ -1377,7 +1377,7 @@ public void shouldConsumeEventsWithMaskedHashedColumns() throws InterruptedExcep
@Test
@FixFor("DBZ-1972")
public void shouldConsumeEventsWithTruncatedColumns() throws InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
// Use the DB configuration to define the connector's configuration ...
config = RO_DATABASE.defaultConfig()
@ -2243,7 +2243,7 @@ public void shouldRewriteIdentityKeyWithMsgKeyColumnsFieldRegexValidation() thro
@Test
@FixFor("DBZ-1292")
public void shouldOutputRecordsInCloudEventsFormat() throws Exception {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
final String tableName = "products";

View File

@ -34,9 +34,9 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 7, reason = "JSON data type was not added until MySQL 5.7")
public class MySqlConnectorJsonIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("jsonit", "json_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -45,7 +45,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -54,7 +54,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -51,9 +51,9 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "DDL uses fractional second data types, not supported until MySQL 5.6")
public class MySqlConnectorRegressionIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-regression.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-regression.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("regression", "regression_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private static final TemporalAdjuster ADJUSTER = MySqlValueConverters::adjustTemporal;
@ -64,7 +64,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -73,7 +73,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -25,10 +25,10 @@
public class MySqlDateTimeInKeyIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-decimal-column.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-decimal-column.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("pkdb", "datetime_key_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -37,7 +37,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -46,7 +46,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -32,10 +32,10 @@ public class MySqlDecimalColumnIT extends AbstractConnectorTest {
private static final String PRECISION_PARAMETER_KEY = "connect.decimal.precision";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-decimal-column.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-decimal-column.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("decimalcolumnit", "decimal_column_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -44,7 +44,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -53,7 +53,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -35,10 +35,10 @@ public class MySqlDecimalIT extends AbstractConnectorTest {
private static final String TABLE_NAME = "DBZ730";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-decimal.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-decimal.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("decimaldb", "decimal_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -47,7 +47,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
skipAvroValidation(); // https://github.com/confluentinc/schema-registry/issues/1693
}
@ -57,7 +57,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -36,8 +36,8 @@ public class MySqlEnumColumnIT extends AbstractConnectorTest {
private static final String TYPE_LENGTH_PARAMETER_KEY = "__debezium.source.column.length";
private static final String TYPE_SCALE_PARAMETER_KEY = "__debezium.source.column.scale";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-enum-column.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("enumcolumnit", "enum_column_test").withDbHistoryPath(DB_HISTORY_PATH);
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-enum-column.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("enumcolumnit", "enum_column_test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -46,7 +46,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -55,7 +55,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -30,10 +30,10 @@
*/
public class MySqlFixedLengthBinaryColumnIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-binary-column.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-binary-column.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("binarycolumnit", "binary_column_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -42,7 +42,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -51,7 +51,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -33,10 +33,10 @@
*/
public class MySqlFloatIT extends AbstractConnectorTest {
private static final String TABLE_NAME = "DBZ3865";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-float.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-float.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("floatit", "float_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -45,7 +45,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -54,7 +54,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -36,7 +36,7 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "Function ST_GeomFromText not added until MySQL 5.6")
public class MySqlGeometryIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt")
.toAbsolutePath();
private UniqueDatabase DATABASE;
private DatabaseGeoDifferences databaseDifferences;
@ -49,11 +49,11 @@ public void beforeEach() {
databaseDifferences = databaseGeoDifferences(MySqlTestConnection.isMySQL5());
DATABASE = new UniqueDatabase("geometryit", databaseDifferences.geometryDatabaseName())
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -62,7 +62,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -40,9 +40,9 @@
*/
public class MySqlMetricsIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-metrics.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-metrics.txt").toAbsolutePath();
private static final String SERVER_NAME = "myserver";
private final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "connector_metrics_test").withDbHistoryPath(DB_HISTORY_PATH);
private final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "connector_metrics_test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
private static final String INSERT1 = "INSERT INTO simple (val) VALUES (25);";
private static final String INSERT2 = "INSERT INTO simple (val) VALUES (50);";
@ -53,7 +53,7 @@ public void before() throws Exception {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -62,7 +62,7 @@ public void after() throws Exception {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}
@ -73,7 +73,7 @@ public void testLifecycle() throws Exception {
DATABASE.defaultConfig()
.with(MySqlConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(MySqlConnectorConfig.TABLE_INCLUDE_LIST, DATABASE.qualifiedTableName("simple"))
.with(MySqlConnectorConfig.TABLES_IGNORE_BUILTIN, Boolean.TRUE)
.with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, Boolean.TRUE)
@ -121,7 +121,7 @@ public void testSnapshotOnlyMetrics() throws Exception {
DATABASE.defaultConfig()
.with(MySqlConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY)
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(MySqlConnectorConfig.TABLE_INCLUDE_LIST, DATABASE.qualifiedTableName("simple"))
.with(MySqlConnectorConfig.TABLES_IGNORE_BUILTIN, Boolean.TRUE)
.with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, Boolean.TRUE)
@ -148,7 +148,7 @@ public void testPauseResumeSnapshotMetrics() throws Exception {
DATABASE.defaultConfig()
.with(MySqlConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(MySqlConnectorConfig.TABLE_INCLUDE_LIST, String.format("%s", TABLE_NAME))
.with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, Boolean.TRUE)
.with(CommonConnectorConfig.INCREMENTAL_SNAPSHOT_CHUNK_SIZE, 1)
@ -199,7 +199,7 @@ public void testSnapshotAndStreamingMetrics() throws Exception {
DATABASE.defaultConfig()
.with(MySqlConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(MySqlConnectorConfig.TABLE_INCLUDE_LIST, DATABASE.qualifiedTableName("simple"))
.with(MySqlConnectorConfig.TABLES_IGNORE_BUILTIN, Boolean.TRUE)
.with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, Boolean.TRUE)
@ -216,7 +216,7 @@ public void testStreamingOnlyMetrics() throws Exception {
DATABASE.defaultConfig()
.with(MySqlConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER)
.with(MySqlConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(MySqlConnectorConfig.TABLE_INCLUDE_LIST, DATABASE.qualifiedTableName("simple"))
.with(MySqlConnectorConfig.TABLES_IGNORE_BUILTIN, Boolean.TRUE)
.with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, Boolean.TRUE)

View File

@ -32,10 +32,10 @@ public class MySqlNumericColumnIT extends AbstractConnectorTest {
private static final String PRECISION_PARAMETER_KEY = "connect.decimal.precision";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-numeric-column.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-numeric-column.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("numericcolumnit", "numeric_column_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -44,7 +44,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -53,7 +53,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -26,8 +26,8 @@
* @author Jiri Pechanec
*/
public class MySqlRestartIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-restart.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("restart", "connector_test").withDbHistoryPath(DB_HISTORY_PATH);
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-restart.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("restart", "connector_test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -36,7 +36,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -45,7 +45,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -29,7 +29,7 @@
*/
public class MySqlSchemaHistoryIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt")
.toAbsolutePath();
private static final int TABLE_COUNT = 2;
@ -42,11 +42,11 @@ public class MySqlSchemaHistoryIT extends AbstractConnectorTest {
public void beforeEach() {
stopConnector();
DATABASE = new UniqueDatabase("history", "history-dbz")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -55,7 +55,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -26,10 +26,10 @@
*/
public class MySqlSchemaMigrationIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt")
.toAbsolutePath();
private UniqueDatabase DATABASE = new UniqueDatabase("migration", "empty")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -39,7 +39,7 @@ public void beforeEach() {
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -48,7 +48,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -25,10 +25,10 @@
public class MySqlSchemaNameAdjustmentModeIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("adjustment1", "schema_name_adjustment")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
@Before
public void beforeEach() throws SQLException {
@ -36,7 +36,7 @@ public void beforeEach() throws SQLException {
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -45,7 +45,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -35,10 +35,10 @@ public class MySqlSourceTypeInSchemaIT extends AbstractConnectorTest {
private static final String TYPE_LENGTH_PARAMETER_KEY = "__debezium.source.column.length";
private static final String TYPE_SCALE_PARAMETER_KEY = "__debezium.source.column.scale";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-schema-parameter.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-schema-parameter.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("schemaparameterit", "source_type_as_schema_parameter_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -47,7 +47,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -56,7 +56,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -31,10 +31,10 @@ public class MySqlTableAndColumnCommentIT extends AbstractConnectorTest {
private static final String COLUMN_COMMENT_PARAMETER_KEY = "__debezium.source.column.comment";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-comment.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-comment.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("commentit", "table_column_comment_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -43,7 +43,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -52,7 +52,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -24,10 +24,10 @@
*/
public class MySqlTableMaintenanceStatementsIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-table-maintenance.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-table-maintenance.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("tablemaintenanceit", "table_maintenance_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -36,7 +36,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -45,7 +45,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -28,8 +28,8 @@
*/
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, patch = 5, reason = "MySQL 5.5 does not support CURRENT_TIMESTAMP on DATETIME and only a single column can specify default CURRENT_TIMESTAMP, lifted in MySQL 5.6.5")
public class MySqlTimestampColumnIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-timestamp-column.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("timestampcolumnit", "timestamp_column_test").withDbHistoryPath(DB_HISTORY_PATH);
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-timestamp-column.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("timestampcolumnit", "timestamp_column_test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -38,7 +38,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -47,7 +47,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -31,10 +31,10 @@
*/
public class MySqlTinyIntIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-year.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-year.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("tinyintit", "tinyint_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -43,7 +43,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -52,7 +52,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -32,10 +32,10 @@
public class MySqlTopicNamingStrategyIT extends AbstractConnectorTest {
private static final String TABLE_NAME = "dbz4180";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-comment.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-comment.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("topic_strategy", "strategy_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -44,7 +44,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -53,7 +53,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -31,20 +31,20 @@
*/
public class MySqlUnsignedIntegerIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-json.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-json.txt")
.toAbsolutePath();
private Configuration config;
private final UniqueDatabase DATABASE = new UniqueDatabase("unsignednumericit", "unsigned_integer_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
@Before
public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -53,7 +53,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -28,10 +28,10 @@
*/
public class MySqlYearIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-year.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-year.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("yearit", "year_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -40,7 +40,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -49,7 +49,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -23,9 +23,9 @@
public class MysqlDefaultDatabaseCharsetIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "db_default_charset", "utf8mb4")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -34,7 +34,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -43,7 +43,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -32,9 +32,9 @@ public class MysqlDefaultGeneratedValueIT extends AbstractConnectorTest {
// 4 meta events (set character_set etc.) and then 15 tables with 3 events each (drop DDL, create DDL, insert)
private static final int EVENT_COUNT = 4 + 15 * 3;
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "default_value_generated")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -43,7 +43,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -52,7 +52,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -26,9 +26,9 @@
*/
public class MysqlDefaultValueAllZeroTimeIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "default_value_all_zero_time")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -37,7 +37,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize(Collections.singletonMap("sessionVariables", "sql_mode=''"));
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -46,7 +46,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -60,9 +60,9 @@ public class MysqlDefaultValueIT extends AbstractConnectorTest {
// 4 meta events (set character_set etc.) and then 14 tables with 3 events each (drop DDL, create DDL, insert)
private static final int EVENT_COUNT = 4 + 14 * 3;
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "default_value")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -71,7 +71,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
skipAvroValidation(); // https://github.com/confluentinc/schema-registry/issues/1693
}
@ -81,7 +81,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -24,9 +24,9 @@
public class MysqlNonUtfDatabaseCharsetIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "db_default_charset_noutf", "latin2")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -35,7 +35,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -44,7 +44,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -60,9 +60,9 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "DDL uses fractional second data types, not supported until MySQL 5.6")
public class SnapshotSourceIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-snapshot.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-snapshot.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("logical_server_name", "connector_test_ro")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private final UniqueDatabase OTHER_DATABASE = new UniqueDatabase("logical_server_name", "connector_test", DATABASE);
private final UniqueDatabase BINARY_FIELD_DATABASE = new UniqueDatabase("logical_server_name", "connector_read_binary_field_test");
@ -73,7 +73,7 @@ public class SnapshotSourceIT extends AbstractConnectorTest {
@Before
public void beforeEach() {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
DATABASE.createAndInitialize();
OTHER_DATABASE.createAndInitialize();
BINARY_FIELD_DATABASE.createAndInitialize();
@ -85,7 +85,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -66,9 +66,9 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "DDL uses fractional second data types, not supported until MySQL 5.6")
public class StreamingSourceIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-binlog.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-binlog.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("logical_server_name", "connector_test_ro")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private static final String SET_TLS_PROTOCOLS = "database.enabledTLSProtocols";
@ -84,7 +84,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
this.store = KeyValueStore.createForTopicsBeginningWith(DATABASE.getServerName() + ".");
this.schemaChanges = new SchemaChangeHistory(DATABASE.getServerName());
@ -96,7 +96,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}
@ -327,7 +327,7 @@ public void shouldFilterAllRecordsBasedOnDatabaseIncludeListFilter() throws Exce
@FixFor("DBZ-183")
public void shouldHandleTimestampTimezones() throws Exception {
final UniqueDatabase REGRESSION_DATABASE = new UniqueDatabase("logical_server_name", "regression_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
REGRESSION_DATABASE.createAndInitialize();
String tableName = "dbz_85_fractest";
@ -364,7 +364,7 @@ public void shouldHandleTimestampTimezones() throws Exception {
@FixFor("DBZ-342")
public void shouldHandleMySQLTimeCorrectly() throws Exception {
final UniqueDatabase REGRESSION_DATABASE = new UniqueDatabase("logical_server_name", "regression_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
REGRESSION_DATABASE.createAndInitialize();
String tableName = "dbz_342_timetest";
@ -458,7 +458,7 @@ public void shouldIgnoreOnSchemaInconsistency() throws Exception {
@SkipWhenDatabaseVersion(check = LESS_THAN_OR_EQUAL, major = 5, minor = 6, reason = "MySQL 5.6 does not support SSL")
public void shouldFailOnUnknownTlsProtocol() {
final UniqueDatabase REGRESSION_DATABASE = new UniqueDatabase("logical_server_name", "regression_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
REGRESSION_DATABASE.createAndInitialize();
config = simpleConfig()
@ -478,7 +478,7 @@ public void shouldFailOnUnknownTlsProtocol() {
@SkipWhenDatabaseVersion(check = LESS_THAN_OR_EQUAL, major = 5, minor = 6, reason = "MySQL 5.6 does not support SSL")
public void shouldAcceptTls12() throws Exception {
final UniqueDatabase REGRESSION_DATABASE = new UniqueDatabase("logical_server_name", "regression_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
REGRESSION_DATABASE.createAndInitialize();
config = simpleConfig()

View File

@ -30,10 +30,10 @@
*/
public class TopicNameSanitizationIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-topic-name-sanitization.txt")
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-topic-name-sanitization.txt")
.toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("topic-name.sanitization-it", "topic_name_sanitization_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -42,7 +42,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -51,7 +51,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -38,10 +38,10 @@ public class TransactionMetadataIT extends AbstractConnectorTest {
private static final String CUSTOMER_INSERT_STMT_2 = "INSERT INTO customers (first_name, last_name, email) VALUES ('Rajesh', 'Agarwal', 'test2@abc.com' ); ";
private static final String ORDER_INSERT_STMT = "INSERT INTO orders (order_date, purchaser, quantity, product_id) VALUES ('2016-01-16', 1001, 1, 1); ";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-tm.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-tm.txt").toAbsolutePath();
private static final String SERVER_NAME = "tm_test";
private final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "transaction_metadata_test").withDbHistoryPath(DB_HISTORY_PATH);
private final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "transaction_metadata_test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -50,7 +50,7 @@ public void beforeEach() {
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -59,7 +59,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -41,10 +41,10 @@ public class TransactionPayloadIT extends AbstractConnectorTest {
private static final String ORDER_UPDATE_STMT_1 = "UPDATE orders set order_date = '2017-01-16' where order_number = 10001; ";
private static final String ORDER_DELETE_STMT_1 = "DELETE from orders where order_number = 10001; ";
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-tp.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-tp.txt").toAbsolutePath();
private static final String SERVER_NAME = "transactionpayload_it";
private final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "transactionpayload_test").withDbHistoryPath(DB_HISTORY_PATH);
private final UniqueDatabase DATABASE = new UniqueDatabase(SERVER_NAME, "transactionpayload_test").withDbHistoryPath(SCHEMA_HISTORY_PATH);
@Rule
public SkipTestRule skipTest = new SkipTestRule();
private Configuration config;
@ -54,7 +54,7 @@ public void beforeEach() throws TimeoutException, IOException, SQLException, Int
stopConnector();
DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -63,7 +63,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}

View File

@ -42,11 +42,11 @@
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 5, minor = 6, reason = "DDL uses fractional second data types, not supported until MySQL 5.6")
public class ZZZGtidSetIT extends AbstractConnectorTest {
private static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
private static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
private final UniqueDatabase DATABASE = new UniqueDatabase("myServer1", "connector_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private final UniqueDatabase RO_DATABASE = new UniqueDatabase("myServer2", "connector_test_ro", DATABASE)
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
private Configuration config;
@ -56,7 +56,7 @@ public void beforeEach() {
DATABASE.createAndInitialize();
RO_DATABASE.createAndInitialize();
initializeConnectorTestFramework();
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
@After
@ -65,7 +65,7 @@ public void afterEach() {
stopConnector();
}
finally {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
}
}
@ -85,7 +85,7 @@ private boolean isGtidModeEnabled() throws SQLException {
@Test
@FixFor("DBZ-1184")
public void shouldProcessPurgedGtidSet() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
if (!isGtidModeEnabled()) {
logger.warn("GTID is not enabled, skipping shouldProcessPurgedGtidSet");
@ -94,9 +94,9 @@ public void shouldProcessPurgedGtidSet() throws SQLException, InterruptedExcepti
purgeDatabaseLogs();
final UniqueDatabase database = new UniqueDatabase("myServer1", "connector_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
final UniqueDatabase ro_database = new UniqueDatabase("myServer2", "connector_test_ro", database)
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
ro_database.createAndInitialize();
// Use the DB configuration to define the connector's configuration ...
@ -174,7 +174,7 @@ private List<String> getBinlogs(JdbcConnection connection) throws SQLException {
@Test
@FixFor("DBZ-1244")
public void shouldProcessPurgedLogsWhenDownAndSnapshotNeeded() throws SQLException, InterruptedException {
Testing.Files.delete(DB_HISTORY_PATH);
Testing.Files.delete(SCHEMA_HISTORY_PATH);
if (!isGtidModeEnabled()) {
logger.warn("GTID is not enabled, skipping shouldProcessPurgedLogsWhenDownAndSnapshotNeeded");
@ -183,7 +183,7 @@ public void shouldProcessPurgedLogsWhenDownAndSnapshotNeeded() throws SQLExcepti
purgeDatabaseLogs();
final UniqueDatabase database = new UniqueDatabase("myServer1", "connector_test")
.withDbHistoryPath(DB_HISTORY_PATH);
.withDbHistoryPath(SCHEMA_HISTORY_PATH);
database.createAndInitialize();
// Use the DB configuration to define the connector's configuration ...

View File

@ -50,7 +50,7 @@ public void before() throws Exception {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -48,7 +48,7 @@ public void before() throws Exception {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -63,7 +63,7 @@ public static void closeConnection() throws SQLException {
public void before() throws SQLException {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@Test

View File

@ -43,7 +43,7 @@ public void before() throws SQLException {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -63,7 +63,7 @@ public void before() {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -63,7 +63,7 @@ public void before() {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -115,7 +115,7 @@ public void before() throws SQLException {
connection.execute("ALTER TABLE debezium.table2 ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -193,7 +193,7 @@ public void before() throws SQLException {
connection.execute("delete from debezium.dt_table");
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@Test
@ -4209,7 +4209,7 @@ private void testTableWithForwardSlashes(String tableName, String topicTableName
try {
// Always want to make sure the offsets are cleared for each invocation of this sub-test
Testing.Files.delete(OFFSET_STORE_PATH);
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
connection.execute("CREATE TABLE " + quotedTableName + " (id numeric(9,0) primary key, data varchar2(50))");
connection.execute("INSERT INTO " + quotedTableName + " (id,data) values (1, 'Record1')");

View File

@ -50,7 +50,7 @@ public void before() throws Exception {
connection = TestHelper.testConnection();
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
TestHelper.dropTable(connection, "default_value_test");
TestHelper.dropSequence(connection, "debezium_seq");

View File

@ -43,7 +43,7 @@ public void before() throws Exception {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
connection.execute("CREATE TABLE NUMBER_ONE_TEST (id numeric primary key, data number(1) default 0, data2 number(1) default 1)");
TestHelper.streamTable(connection, "debezium.number_one_test");

View File

@ -69,7 +69,7 @@ public void before() throws Exception {
connection.execute("delete from debezium.type_rowid");
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@Test

View File

@ -52,7 +52,7 @@ public void beforeEach() throws Exception {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
TestHelper.dropAllTables();
}

View File

@ -43,7 +43,7 @@ public void beforeEach() throws Exception {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
super.beforeEach();
}

View File

@ -55,7 +55,7 @@ public void before() throws SQLException {
connection.execute("ALTER TABLE debezium.tablec ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -88,7 +88,7 @@ public void before() throws SQLException {
connection.execute("delete from debezium.debezium_signal");
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@Test

View File

@ -52,7 +52,7 @@ protected void init(TemporalPrecisionMode temporalPrecisionMode) throws Exceptio
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Debug.enable();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
Configuration config = connectorConfig()
.with(OracleConnectorConfig.TIME_PRECISION_MODE, temporalPrecisionMode)

View File

@ -65,7 +65,7 @@ public void before() throws SQLException {
TestHelper.streamTable(connection, "debezium.table3");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -40,7 +40,7 @@ protected void init(TemporalPrecisionMode temporalPrecisionMode) throws Exceptio
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
dropTables();
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
Configuration config = connectorConfig()
.with(OracleConnectorConfig.TIME_PRECISION_MODE, temporalPrecisionMode)

View File

@ -85,7 +85,7 @@ public void before() throws SQLException {
connection.execute("delete from debezium.orders");
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@Test

View File

@ -62,7 +62,7 @@ public static void closeConnection() throws SQLException {
public void before() throws SQLException {
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@Test

View File

@ -47,7 +47,7 @@ public void before() throws Exception {
connection = TestHelper.testConnection();
setConsumeTimeout(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
TestHelper.dropTable(connection, "dbz3752");

View File

@ -36,7 +36,7 @@ public class TestHelper {
private static final String DATABASE_PREFIX = "database.";
private static final String DATABASE_ADMIN_PREFIX = "database.admin.";
public static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
public static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
public static final String CONNECTOR_USER = "c##dbzuser";
public static final String CONNECTOR_NAME = "oracle";
@ -163,7 +163,7 @@ public static Configuration.Builder defaultConfig() {
return builder.with(AbstractTopicNamingStrategy.TOPIC_PREFIX, SERVER_NAME)
.with(OracleConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(OracleConnectorConfig.INCLUDE_SCHEMA_CHANGES, false);
}

View File

@ -307,7 +307,7 @@ private void assertRecord(Struct record, List<SchemaAndValueField> expected) {
public void init(TemporalPrecisionMode temporalPrecisionMode) throws Exception {
initializeConnectorTestFramework();
Testing.Debug.enable();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
Configuration config = TestHelper.defaultConfig()
.with(SqlServerConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)

View File

@ -38,7 +38,7 @@ public void before() throws SQLException {
connection = TestHelper.testConnection();
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -47,7 +47,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tableb");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -40,7 +40,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "debezium_signal");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -39,7 +39,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "debezium_signal");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -57,7 +57,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tablenumd");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -53,7 +53,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tableb");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -76,7 +76,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "table1");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After
@ -253,7 +253,7 @@ public void takeSnapshotFromTableWithReservedName() throws Exception {
TestHelper.enableTableCdc(connection, "User");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
final Configuration config = TestHelper.defaultConfig()
.with(TABLE_INCLUDE_LIST, "dbo.User")

View File

@ -79,7 +79,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "table3");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -47,7 +47,7 @@ public void shouldParseWhitespaceChars() throws Exception {
connection = TestHelper.testConnection();
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
final Configuration config = TestHelper.defaultConfig()
.with(SqlServerConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)
@ -117,7 +117,7 @@ public void shouldParseSpecialChars() throws Exception {
connection = TestHelper.testConnection();
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
final Configuration config = TestHelper.defaultConfig()
.with(SqlServerConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)
@ -255,7 +255,7 @@ public void shouldHandleSpecialCharactersInDatabaseNames() throws Exception {
connection = TestHelper.testConnection(databaseName);
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
final Configuration config = TestHelper.defaultConfig(databaseName)
.with(SqlServerConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL)

View File

@ -39,7 +39,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "binary_mode_test");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -54,7 +54,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tableb");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
// Testing.Debug.enable();
}
@ -607,7 +607,7 @@ public void readHistoryAfterRestart() throws Exception {
// Validate history change types
final DocumentReader reader = DocumentReader.defaultReader();
final List<Document> changes = new ArrayList<>();
IoUtil.readLines(TestHelper.DB_HISTORY_PATH, line -> {
IoUtil.readLines(TestHelper.SCHEMA_HISTORY_PATH, line -> {
try {
changes.add(reader.read(line));
}

View File

@ -91,7 +91,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tableb");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
// Testing.Print.enable();
}
@ -2068,7 +2068,7 @@ public void shouldDetectPurgedHistory() throws Exception {
connection.execute("INSERT INTO tableb VALUES(" + id + ", 'b')");
}
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
final LogInterceptor logInterceptor = new LogInterceptor(SqlServerConnectorIT.class);
start(SqlServerConnector.class, config);
@ -2622,7 +2622,7 @@ public static class PurgableFileSchemaHistory implements SchemaHistory {
@Override
public boolean exists() {
try {
return storageExists() && java.nio.file.Files.size(TestHelper.DB_HISTORY_PATH) > 0;
return storageExists() && java.nio.file.Files.size(TestHelper.SCHEMA_HISTORY_PATH) > 0;
}
catch (IOException e) {
throw new SchemaHistoryException("File should exist");

View File

@ -48,7 +48,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tableC");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -37,7 +37,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "name-adjustment");
initializeConnectorTestFramework();
Files.delete(TestHelper.DB_HISTORY_PATH);
Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -43,7 +43,7 @@ public void before() throws SQLException {
TestHelper.createTestDatabase();
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -40,7 +40,7 @@ public void before() throws SQLException {
TestHelper.createTestDatabase();
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
}
@After

View File

@ -64,7 +64,7 @@ public void before() throws SQLException {
TestHelper.enableTableCdc(connection, "tableb");
initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.DB_HISTORY_PATH);
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
// Testing.Print.enable();
}

View File

@ -55,7 +55,7 @@ public class TestHelper {
private static final Logger LOGGER = LoggerFactory.getLogger(TestHelper.class);
public static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-connect.txt").toAbsolutePath();
public static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-connect.txt").toAbsolutePath();
public static final String TEST_DATABASE_1 = "testDB1";
public static final String TEST_DATABASE_2 = "testDB2";
public static final String TEST_SERVER_NAME = "server1";
@ -127,7 +127,7 @@ public static Configuration.Builder defaultConnectorConfig() {
return builder.with(AbstractTopicNamingStrategy.TOPIC_PREFIX, "server1")
.with(SqlServerConnectorConfig.SCHEMA_HISTORY, FileSchemaHistory.class)
.with(FileSchemaHistory.FILE_PATH, DB_HISTORY_PATH)
.with(FileSchemaHistory.FILE_PATH, SCHEMA_HISTORY_PATH)
.with(RelationalDatabaseConnectorConfig.INCLUDE_SCHEMA_CHANGES, false);
}

View File

@ -51,7 +51,7 @@ public abstract class AbstractIncrementalSnapshotTest<T extends SourceConnector>
protected static final int ROW_COUNT = 1_000;
private static final int MAXIMUM_NO_RECORDS_CONSUMES = 5;
protected static final Path DB_HISTORY_PATH = Testing.Files.createTestingPath("file-db-history-is.txt")
protected static final Path SCHEMA_HISTORY_PATH = Testing.Files.createTestingPath("file-schema-history-is.txt")
.toAbsolutePath();
protected abstract Class<T> connectorClass();