KAFKA-20963: Remove hamcrest from org.apache.kafka.streams.processor - #23200
Merged
Conversation
uros-b
approved these changes
Aug 21, 2026
chia7712
pushed a commit
that referenced
this pull request
Aug 26, 2026
…nternals.metrics package (#23278) JIRA: https://issues.apache.org/jira/browse/KAFKA-20987 Parent: https://issues.apache.org/jira/browse/KAFKA-20948 Migrate hamcrest `assertThat` usage in `org.apache.kafka.streams.processor.internals.metrics` tests to JUnit 5. This package is not covered by the existing subtasks: - KAFKA-20963 / PR #23200 covers only `org.apache.kafka.streams.processor` (top-level) - KAFKA-20965 / PR #23201 covers `org.apache.kafka.streams.state.internals.metrics` Files changed: - `ProcessorNodeMetricsTest.java` - `StreamsMetricsImplTest.java` - `TaskMetricsTest.java` - `ThreadMetricsTest.java` - `TopicMetricsTest.java` No production code changes. This contribution is original work and is licensed to the project under the Apache License, Version 2.0. ### Tests ``` ./gradlew :streams:test \ --tests org.apache.kafka.streams.processor.internals.metrics.ProcessorNodeMetricsTest \ --tests org.apache.kafka.streams.processor.internals.metrics.StreamsMetricsImplTest \ --tests org.apache.kafka.streams.processor.internals.metrics.TaskMetricsTest \ --tests org.apache.kafka.streams.processor.internals.metrics.ThreadMetricsTest \ --tests org.apache.kafka.streams.processor.internals.metrics.TopicMetricsTest \ :streams:checkstyleTest :streams:spotlessCheck ``` BUILD SUCCESSFUL. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712
reviewed
Aug 27, 2026
| @@ -35,29 +32,8 @@ public void extractSystemTimestamp() { | |||
| final long timestamp = extractor.extract(new ConsumerRecord<>("anyTopic", 0, 0, null, null), 42); | |||
Member
There was a problem hiding this comment.
We should set an explicit record timestamp to verify that WallclockTimestampExtractor ignores both the record timestamp and the partition time, and returns the wall-clock time instead.
Member
There was a problem hiding this comment.
This is unrelated to this patch. I will file a patch to address it
Contributor
There was a problem hiding this comment.
Thanks for pointing out!
I opened a minor patch for it: #23289.
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.
Migrate usages of hamcrest to junit
Reviewers: Uros (github:uros-b), Ken Huang s7133700@gmail.com