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/11/01 06:29:42 UTC

[GitHub] [kafka] mdedetrich commented on pull request #12728: KAFKA-14132; Replace EasyMock with Mockito in StandaloneHerderTest

mdedetrich commented on PR #12728:
URL: https://github.com/apache/kafka/pull/12728#issuecomment-1298085160

   @C0urante Due to a conflict I rebased this test off of `origin/trunk` and there was a merge conflict due to the `StandaloneHerderTest` being updated, just make sure you check the bottom part of `expectAdd`, i.e.
   
   ```java
           ArgumentCaptor<Map<String, String>> configCapture = ArgumentCaptor.forClass(Map.class);
           when(herder.connectorType(configCapture.capture())).thenAnswer(invocation -> {
               String connectorClass = configCapture.getValue().get(ConnectorConfig.CONNECTOR_CLASS_CONFIG);
               if (BogusSourceConnector.class.getName().equals(connectorClass)) {
                   return ConnectorType.SOURCE;
               } else if (BogusSinkConnector.class.getName().equals(connectorClass)) {
                   return ConnectorType.SINK;
               }
               return ConnectorType.UNKNOWN;
           });
   
           when(worker.isSinkConnector(CONNECTOR_NAME))
                   .thenReturn(sourceSink == SourceSink.SINK);
   ```


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