KStreams PAPI test for TimestampedWindowStoreWithHeaders - #4415
Open
Lucy Liu (lucliu1108) wants to merge 3 commits into
Open
KStreams PAPI test for TimestampedWindowStoreWithHeaders#4415Lucy Liu (lucliu1108) wants to merge 3 commits into
Lucy Liu (lucliu1108) wants to merge 3 commits into
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Kafka Streams integration test class to validate TimestampedWindowStoreWithHeaders behavior when schema IDs are transported via record headers (PAPI), including both processor-driven store operations and IQv1 query access.
Changes:
- Adds
TimestampedWindowStoreWithHeadersIntegrationTestcovering put/point fetch, range fetch variants, time-range fetchAll/backward fetchAll, and key-range fetch variants. - Adds IQv1 verification using a custom
QueryableStoreTypeto queryTimestampedWindowStoreWithHeadersand validate returned headers. - Adds additional scenarios for delete via tombstones, iterator behavior (
all()+ iterator methods), and restore-from-changelog header preservation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+90
to
+92
| private static final String INPUT_TOPIC = "events-input"; | ||
| private static final String OUTPUT_TOPIC = "windowed-output"; | ||
| private static final String STORE_NAME = "event-window-store"; |
Comment on lines
+87
to
+88
| public class | ||
| TimestampedWindowStoreWithHeadersIntegrationTest extends ClusterTestHarness { |
Comment on lines
+715
to
+726
| List<ConsumerRecord<GenericRecord, byte[]>> changelogRecords = | ||
| consumeRecords(changelogTopic, "changelog-consumer", 12, ByteArrayDeserializer.class); | ||
|
|
||
| int tombstoneCount = 0; | ||
| for (ConsumerRecord<GenericRecord, byte[]> record : changelogRecords) { | ||
| if (record.value() == null) { | ||
| tombstoneCount++; | ||
| Header keySchemaIdHeader = record.headers().lastHeader(SchemaId.KEY_SCHEMA_ID_HEADER); | ||
| assertNotNull(keySchemaIdHeader, | ||
| "Tombstone record should have key schema ID header"); | ||
| } | ||
| } |
|
…d-store-header-test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Summary
This PR adds:
What
Checklist
Please answer the questions with Y, N or N/A if not applicable.
References
JIRA:
Test & Review
Open questions / Follow-ups