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/08 16:50:01 UTC

[PR] KAFKA-21028: [1/2] Remove hamcrest from org.apache.kafka.streams.processor.internals package [kafka]

majialoong opened a new pull request, #23407:
URL: https://github.com/apache/kafka/pull/23407

   Remove hamcrest from a subset of tests in the `org.apache.kafka.streams.processor.internals` package by migrating to JUnit assertions.


-- 
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-21028: [1/2] Remove hamcrest from org.apache.kafka.streams.processor.internals package [kafka]

Posted by "majialoong (via GitHub)" <gi...@apache.org>.
majialoong commented on code in PR #23407:
URL: https://github.com/apache/kafka/pull/23407#discussion_r3960351788


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/KeyValueStoreMaterializerTest.java:
##########
@@ -179,10 +178,10 @@ public void shouldCreateHeadersStoreWithProvidedSupplierAndCachingAndLoggingEnab
 
         final WrappedStateStore<?, ?, ?> caching = (WrappedStateStore<?, ?, ?>) ((WrappedStateStore<?, ?, ?>) store).wrapped();
         final StateStore logging = caching.wrapped();
-        assertThat(innerKeyValueStore.name(), equalTo(store.name()));
-        assertThat(store, instanceOf(MeteredTimestampedKeyValueStoreWithHeaders.class));
-        assertThat(caching, instanceOf(CachingKeyValueStore.class));
-        assertThat(logging, instanceOf(ChangeLoggingTimestampedKeyValueBytesStoreWithHeaders.class));
+        assertEquals(innerKeyValueStore.name(), store.name());

Review Comment:
   `innerKeyValueStore.name()` should be the expected value, and `store.name()` should be the actual value.



-- 
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-21028: [1/2] Remove hamcrest from org.apache.kafka.streams.processor.internals package [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #23407:
URL: https://github.com/apache/kafka/pull/23407


-- 
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-21028: [1/2] Remove hamcrest from org.apache.kafka.streams.processor.internals package [kafka]

Posted by "majialoong (via GitHub)" <gi...@apache.org>.
majialoong commented on code in PR #23407:
URL: https://github.com/apache/kafka/pull/23407#discussion_r3960320748


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/PartitionGroupTest.java:
##########
@@ -421,7 +415,7 @@ public void shouldThrowIllegalStateExceptionUponAddRecordsIfPartitionUnknown() {
         final IllegalStateException exception = assertThrows(
             IllegalStateException.class,
             () -> group.addRawRecords(unknownPartition, null));
-        assertThat(errMessage, equalTo(exception.getMessage()));
+        assertEquals(errMessage, exception.getMessage());

Review Comment:
   `errMessage` should be the expected value, and `exception.getMessage()` should be the actual value.



-- 
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