vcrfxia commented on code in PR #13274: URL: https://github.com/apache/kafka/pull/13274#discussion_r1110458195
########## streams/src/test/java/org/apache/kafka/streams/state/internals/TimestampedKeyValueStoreBuilderTest.java: ########## @@ -154,17 +154,34 @@ public void shouldThrowNullPointerIfInnerIsNull() { } @Test - public void shouldThrowNullPointerIfKeySerdeIsNull() { - assertThrows(NullPointerException.class, () -> new TimestampedKeyValueStoreBuilder<>(supplier, null, Serdes.String(), new MockTime())); + public void shouldNotThrowNullPointerIfKeySerdeIsNull() { Review Comment: These test changes are not directly related to this PR. While I was in here looking for inspiration for the new VersionedKeyValueStoreBuilderTest.java tests, I noticed that these tests were broken. The only reason they were throwing NullPointerExceptions is because the supplier was not being mocked to return name and metrics scope. Once added, then passing null key or value serdes no longer throws an exception. I also added the same required mocking into `shouldThrowNullPointerIfTimeIsNull()` below so that the test actually throws an NPE on time being null, and not supplier return null for name or metrics scope. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org