You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "majialoong (via GitHub)" <gi...@apache.org> on 2026/09/05 16:53:23 UTC
[PR] KAFKA-21005: Remove hamcrest from org.apache.kafka.streams.kstream.internals package [kafka]
majialoong opened a new pull request, #23370:
URL: https://github.com/apache/kafka/pull/23370
Remove hamcrest from the `org.apache.kafka.streams.kstream.internals` package by migrating its assertions to JUnit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21005: Remove hamcrest from org.apache.kafka.streams.kstream.internals package [kafka]
Posted by "majialoong (via GitHub)" <gi...@apache.org>.
majialoong commented on code in PR #23370:
URL: https://github.com/apache/kafka/pull/23370#discussion_r3941337407
##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/KStreamSessionWindowAggregateProcessorTest.java:
##########
@@ -490,13 +484,8 @@ public void shouldLogAndMeterWhenSkippingNullKeyWithBuiltInMetrics(final EmitStr
processor.process(new Record<>(null, "1", 0L));
- assertThat(
- appender.getEvents().stream()
- .filter(e -> e.getLevel().equals("WARN"))
- .map(Event::getMessage)
- .collect(Collectors.toList()),
- hasItem("Skipping record due to null key. topic=[topic] partition=[-3] offset=[-2]")
- );
+ assertTrue(appender.getMessages("WARN").contains(
Review Comment:
We can use `getMessages("WARN")` here, as it implements the same logic and simplifies the code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21005: Remove hamcrest from org.apache.kafka.streams.kstream.internals package [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #23370:
URL: https://github.com/apache/kafka/pull/23370
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org