Skip to content

Commit

Permalink
DBZ-8543 Fix JdbcOffsetStore and JdbcSchemaHistoryStore
Browse files Browse the repository at this point in the history
  • Loading branch information
mfvitale committed Dec 20, 2024
1 parent 828368a commit b9b58b8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public void setTable(JdbcOffsetTableConfig table) {
@Override
protected ConfigMapping<DebeziumServer> typeConfiguration(DebeziumServer primary) {
return super.typeConfiguration(primary)
.putAll("table", table);
.putAll("offset.table", table);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public void setTable(JdbcSchemaHistoryTableConfig table) {
@Override
protected ConfigMapping<DebeziumServer> typeConfiguration(DebeziumServer primary) {
return super.typeConfiguration(primary)
.putAll("table", table);
.putAll("schema.history.table", table);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ public void shouldHaveJdbcOffsetConfig() {
.containsEntry("debezium.source.offset.storage.jdbc.password", PASSWORD)
.containsEntry("debezium.source.offset.storage.jdbc.retry.max.attempts", String.valueOf(MAX_RETRIES))
.containsEntry("debezium.source.offset.storage.jdbc.wait.retry.delay.ms", String.valueOf(RETRY_DELAY_MS))
.containsEntry("debezium.source.offset.storage.jdbc.table.name", OFFSET_TABLE_NAME)
.containsEntry("debezium.source.offset.storage.jdbc.table.ddl", INVALID_FAKE_SQL)
.containsEntry("debezium.source.offset.storage.jdbc.table.insert", INVALID_FAKE_SQL)
.containsEntry("debezium.source.offset.storage.jdbc.table.select", INVALID_FAKE_SQL)
.containsEntry("debezium.source.offset.storage.jdbc.table.delete", INVALID_FAKE_SQL);
.containsEntry("debezium.source.offset.storage.jdbc.offset.table.name", OFFSET_TABLE_NAME)
.containsEntry("debezium.source.offset.storage.jdbc.offset.table.ddl", INVALID_FAKE_SQL)
.containsEntry("debezium.source.offset.storage.jdbc.offset.table.insert", INVALID_FAKE_SQL)
.containsEntry("debezium.source.offset.storage.jdbc.offset.table.select", INVALID_FAKE_SQL)
.containsEntry("debezium.source.offset.storage.jdbc.offset.table.delete", INVALID_FAKE_SQL);
}

@Test
Expand All @@ -107,11 +107,11 @@ public void shouldHaveDefaultJdbcOffsetTableConfig() {
var config = copy.asConfiguration().getAsMapSimple();

assertThat(config)
.doesNotContainKey("debezium.source.offset.storage.jdbc.table.name")
.doesNotContainKey("debezium.source.offset.storage.jdbc.table.ddl")
.doesNotContainKey("debezium.source.offset.storage.jdbc.table.insert")
.doesNotContainKey("debezium.source.offset.storage.jdbc.table.select")
.doesNotContainKey("debezium.source.offset.storage.jdbc.table.delete");
.doesNotContainKey("debezium.source.offset.storage.jdbc.offset.table.name")
.doesNotContainKey("debezium.source.offset.storage.jdbc.offset.table.ddl")
.doesNotContainKey("debezium.source.offset.storage.jdbc.offset.table.insert")
.doesNotContainKey("debezium.source.offset.storage.jdbc.offset.table.select")
.doesNotContainKey("debezium.source.offset.storage.jdbc.offset.table.delete");
}

@Test
Expand All @@ -125,11 +125,11 @@ public void shouldHaveJdbcSchemaHistoryConfig() {
.containsEntry("debezium.source.schema.history.internal.jdbc.password", PASSWORD)
.containsEntry("debezium.source.schema.history.internal.jdbc.retry.max.attempts", String.valueOf(MAX_RETRIES))
.containsEntry("debezium.source.schema.history.internal.jdbc.wait.retry.delay.ms", String.valueOf(RETRY_DELAY_MS))
.containsEntry("debezium.source.schema.history.internal.jdbc.table.name", SCHEMA_TABLE_NAME)
.containsEntry("debezium.source.schema.history.internal.jdbc.table.ddl", INVALID_FAKE_SQL)
.containsEntry("debezium.source.schema.history.internal.jdbc.table.insert", INVALID_FAKE_SQL)
.containsEntry("debezium.source.schema.history.internal.jdbc.table.select", INVALID_FAKE_SQL)
.containsEntry("debezium.source.schema.history.internal.jdbc.table.exists", INVALID_FAKE_SQL);
.containsEntry("debezium.source.schema.history.internal.jdbc.schema.history.table.name", SCHEMA_TABLE_NAME)
.containsEntry("debezium.source.schema.history.internal.jdbc.schema.history.table.ddl", INVALID_FAKE_SQL)
.containsEntry("debezium.source.schema.history.internal.jdbc.schema.history.table.insert", INVALID_FAKE_SQL)
.containsEntry("debezium.source.schema.history.internal.jdbc.schema.history.table.select", INVALID_FAKE_SQL)
.containsEntry("debezium.source.schema.history.internal.jdbc.schema.history.table.exists", INVALID_FAKE_SQL);
}

@Test
Expand All @@ -139,10 +139,10 @@ public void shouldHaveDefaultJdbcSchemaHistoryTableConfig() {
var config = copy.asConfiguration().getAsMapSimple();

assertThat(config)
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.table.name")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.table.ddl")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.table.insert")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.table.select")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.table.exists");
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.schema.history.table.name")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.schema.history.table.ddl")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.schema.history.table.insert")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.schema.history.table.select")
.doesNotContainKey("debezium.source.schema.history.internal.jdbc.schema.history.table.exists");
}
}

0 comments on commit b9b58b8

Please sign in to comment.