divijvaidya commented on code in PR #14222:
URL: https://github.com/apache/kafka/pull/14222#discussion_r1302664682


##########
streams/src/test/java/org/apache/kafka/streams/state/internals/TimestampedKeyValueStoreBuilderTest.java:
##########
@@ -155,42 +144,24 @@ public void shouldThrowNullPointerIfInnerIsNull() {
 
     @Test
     public void shouldNotThrowNullPointerIfKeySerdeIsNull() {
-        reset(supplier);
-        expect(supplier.name()).andReturn("name");
-        expect(supplier.metricsScope()).andReturn("metricScope").anyTimes();
-        replay(supplier);
-
         // does not throw
         new TimestampedKeyValueStoreBuilder<>(supplier, null, Serdes.String(), 
new MockTime());
     }
 
     @Test
     public void shouldNotThrowNullPointerIfValueSerdeIsNull() {
-        reset(supplier);
-        expect(supplier.name()).andReturn("name");
-        expect(supplier.metricsScope()).andReturn("metricScope").anyTimes();
-        replay(supplier);
-
         // does not throw
         new TimestampedKeyValueStoreBuilder<>(supplier, Serdes.String(), null, 
new MockTime());
     }
 
     @Test
     public void shouldThrowNullPointerIfTimeIsNull() {
-        reset(supplier);
-        expect(supplier.name()).andReturn("name");
-        expect(supplier.metricsScope()).andReturn("metricScope").anyTimes();
-        replay(supplier);
-
         assertThrows(NullPointerException.class, () -> new 
TimestampedKeyValueStoreBuilder<>(supplier, Serdes.String(), Serdes.String(), 
null));
     }
 
     @Test
     public void shouldThrowNullPointerIfMetricsScopeIsNull() {
-        reset(supplier);
-        expect(supplier.get()).andReturn(new RocksDBTimestampedStore("name", 
null));
-        expect(supplier.name()).andReturn("name");

Review Comment:
   I assume that these are unused mocks? Could it be the case that they were 
expected to be used and as a bug in the main code they aren't being used? Have 
you verified this (I haven't looked at the code beyind this test during this 
review)?



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

Reply via email to