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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]