You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/08/17 10:32:25 UTC

[GitHub] [kafka] mdedetrich commented on a diff in pull request #12505: KAFKA-14133: Replace EasyMock with Mockito in streams tests

mdedetrich commented on code in PR #12505:
URL: https://github.com/apache/kafka/pull/12505#discussion_r947761921


##########
streams/src/test/java/org/apache/kafka/streams/state/internals/ChangeLoggingKeyValueBytesStoreTest.java:
##########
@@ -280,12 +276,9 @@ private StreamsConfig streamsConfigMock() {
 
         final Map<String, Object> myValues = new HashMap<>();
         myValues.put(InternalConfig.IQ_CONSISTENCY_OFFSET_VECTOR_ENABLED, true);
-        expect(streamsConfig.originals()).andStubReturn(myValues);
-        expect(streamsConfig.values()).andStubReturn(Collections.emptyMap());
-        expect(streamsConfig.getString(StreamsConfig.APPLICATION_ID_CONFIG)).andStubReturn("add-id");
-        expect(streamsConfig.defaultValueSerde()).andStubReturn(Serdes.ByteArray());
-        expect(streamsConfig.defaultKeySerde()).andStubReturn(Serdes.ByteArray());

Review Comment:
   I can also confirm I had the same problem when migrating `ProcesserStateManagerTest` in https://github.com/apache/kafka/pull/12524, i.e. there was quite a few tests which had extra/unnecessary stubs/verifications which `MockitoJUnitRunner.StrictStubs` picked up.



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