Skip to content

debezium/dbz#188 Stop using KafkaConnectUtil#283

Draft
vjuranek wants to merge 1 commit into
debezium:mainfrom
vjuranek:debezium/dbz#188
Draft

debezium/dbz#188 Stop using KafkaConnectUtil#283
vjuranek wants to merge 1 commit into
debezium:mainfrom
vjuranek:debezium/dbz#188

Conversation

@vjuranek
Copy link
Copy Markdown
Member

@vjuranek vjuranek commented May 6, 2026

Follow-up of debezium/debezium#7377

Signed-off-by: Vojtech Juranek <vojtech.juranek@gmail.com>
Copilot AI review requested due to automatic review settings May 6, 2026 08:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Vitess connector unit tests to stop using the removed/undesired KafkaConnectUtil helper by switching to the newer Debezium offset-store provider APIs, aligning this module with upstream Debezium changes (follow-up to debezium/debezium#7377).

Changes:

  • Replace KafkaConnectUtil.memoryOffsetBackingStore() with a KafkaMemoryOffsetProvider-based in-memory offset store.
  • Update test imports to use KafkaConnectOffsetStoreAdapter and KafkaMemoryOffsetProvider.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/test/java/io/debezium/connector/vitess/VitessConnectorTest.java Replaces in-memory offset store creation to remove dependency on KafkaConnectUtil.
src/test/java/io/debezium/connector/vitess/VitessConnectorTaskTest.java Updates task test context helper to use the new offset provider instead of KafkaConnectUtil.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Map<String, ?> serverOffsets, Map<String, Map<String, ?>> taskOffsets,
Function<Configuration.Builder, Configuration.Builder> customConfig) {
final OffsetBackingStore offsetStore = KafkaConnectUtil.memoryOffsetBackingStore();
final OffsetBackingStore offsetStore = ((KafkaConnectOffsetStoreAdapter) (new KafkaMemoryOffsetProvider()).create(null)).getDelegate();
Comment on lines 1916 to 1918
ContextHelper() {
this.offsetStore = KafkaConnectUtil.memoryOffsetBackingStore();
this.offsetStore = ((KafkaConnectOffsetStoreAdapter) (new KafkaMemoryOffsetProvider()).create(null)).getDelegate();
this.sourceConnectorContext = initSourceConnectorContext();
Comment on lines +221 to 224
this.offsetStore = ((KafkaConnectOffsetStoreAdapter) (new KafkaMemoryOffsetProvider()).create(null)).getDelegate();
this.sourceTaskContext = initSourceTaskContext();
}

@vjuranek vjuranek marked this pull request as draft May 6, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants