MINOR: improve error message for Serde type miss match#6801
Conversation
|
Call for review @guozhangwang @bbejeck @vvcephei @ableegoldman @cadonna @abbccdda |
guozhangwang
left a comment
There was a problem hiding this comment.
One nit, otherwise LGTM!
| } else { | ||
| serializerClass = valueSerializer().getClass(); | ||
| valueClass = value == null ? "unknown because value is null" : value.getClass().getName(); | ||
| } |
There was a problem hiding this comment.
nit: I felt we can remove the value in (value: %s) below?
| assertThat( | ||
| e.getMessage(), | ||
| equalTo( | ||
| "A serializer (value: org.apache.kafka.common.serialization.StringSerializer) " + |
There was a problem hiding this comment.
Could we reuse the error message or the entire template?
There was a problem hiding this comment.
We could reuse for this and the second "value" test, but not for the "key" test. Don't see big value is sharing though.
|
Updated this. Will merge if Jenkins is green again. |
|
Retest this please |
|
Java8 passed. Java11 failed with know flaky test. Retest this please. |
|
Java8 passed. Java11 failed (test results not available any longer). Retest this please. |
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Boyang Chen <boyang@confluent.io>
|
Merged to |
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Boyang Chen <boyang@confluent.io>
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Boyang Chen <boyang@confluent.io>
Atm, if the type does not match, the error is miss leading and not helpful:
This PR makes sure that the actual value type information is in the message to make the
ValueAndTimestampwrapping transparent to the user and to make the error message useful.This should be cherry-picked to
2.3branch.