C0urante commented on code in PR #12307:
URL: https://github.com/apache/kafka/pull/12307#discussion_r901123236
##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerConnectorTest.java:
##########
@@ -142,11 +174,13 @@ public void testFailureIsFinalState() {
ctx.close();
expectLastCall();
- offsetStorageReader.close();
- expectLastCall();
+ if (connectorType == ConnectorType.SOURCE) {
+ offsetStorageReader.close();
+ expectLastCall();
- offsetStore.stop();
- expectLastCall();
+ offsetStore.stop();
+ expectLastCall();
+ }
Review Comment:
@clolov Hi! I'm aware of the effort to transition to Mockito; I don't think
this change makes that transition significantly harder. There are already
examples of parameterized tests in the Connect code base that use Mockito (such
as the [WorkerTest
suite](https://github.com/apache/kafka/blob/cfdd567955588e134770a9145ba57800ca88313c/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java#L200-L207))
that can be followed when we make that transition for this test suite, and all
of the other logic in the changes here is trivial to translate between the two
mocking libraries. I'd rather keep the changes here focused and in-scope for
the ticket that they aim to address, so I would prefer not to add switching
over to a new mocking library to this PR.
--
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]