You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mimaison (via GitHub)" <gi...@apache.org> on 2026/08/17 15:16:03 UTC

[PR] KAFKA-20950: Remove hamcrest from org.apache.kafka.streams.state package [kafka]

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

   Migrate usages of hamcrest 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-20950: Remove hamcrest from org.apache.kafka.streams.state package [kafka]

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


##########
streams/src/test/java/org/apache/kafka/streams/state/StateSerdesTest.java:
##########
@@ -112,12 +110,11 @@ public void shouldThrowIfIncompatibleSerdeForValue() throws ClassNotFoundExcepti
         final StateSerdes<Object, Object> stateSerdes = new StateSerdes<Object, Object>("anyName", Serdes.serdeFrom(myClass), Serdes.serdeFrom(myClass));
         final Integer myInt = 123;
         final Exception e = assertThrows(StreamsException.class, () -> stateSerdes.rawValue(myInt, new RecordHeaders()));
-        assertThat(
-            e.getMessage(),
-            equalTo(
+        assertEquals(
                 "A serializer (org.apache.kafka.common.serialization.StringSerializer) " +
                 "is not compatible to the actual value type (value type: java.lang.Integer). " +
-                "Change the default Serdes in StreamConfig or provide correct Serdes via method parameters."));
+                "Change the default Serdes in StreamConfig or provide correct Serdes via method parameters.",
+                e.getMessage());

Review Comment:
   extra indent here, the two tests below are the reference :)



-- 
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-20950: Remove hamcrest from org.apache.kafka.streams.state package [kafka]

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


-- 
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-20950: Remove hamcrest from org.apache.kafka.streams.state package [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison commented on PR #23178:
URL: https://github.com/apache/kafka/pull/23178#issuecomment-5428284582

   Thanks for the review, I pushed an update


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