ivanyu commented on code in PR #6934: URL: https://github.com/apache/kafka/pull/6934#discussion_r1587963241
########## connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java: ########## @@ -751,6 +754,74 @@ public void testPutConnectorConfig() throws Exception { verifyNoMoreInteractions(connectorConfigCb); } + @Test + public void testPatchConnectorConfigNotFound() { + Map<String, String> connConfigPatch = new HashMap<>(); + connConfigPatch.put("foo1", "baz1"); + + Callback<Herder.Created<ConnectorInfo>> patchCallback = mock(Callback.class); + herder.patchConnectorConfig(CONNECTOR_NAME, connConfigPatch, patchCallback); + + ArgumentCaptor<NotFoundException> exceptionCaptor = ArgumentCaptor.forClass(NotFoundException.class); + verify(patchCallback).onCompletion(exceptionCaptor.capture(), isNull()); + assertEquals(exceptionCaptor.getValue().getMessage(), "Connector " + CONNECTOR_NAME + " not found"); + assertNull(exceptionCaptor.getValue().getCause()); Review Comment: I think, none. Removed -- 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