muralibasani commented on code in PR #23567:
URL: https://github.com/apache/kafka/pull/23567#discussion_r4097010806


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java:
##########
@@ -281,12 +282,18 @@ public void testDestroyConnector() throws Exception {
         Herder.Created<ConnectorInfo> connectorInfo = 
createCallback.get(WAIT_TIME_MS, TimeUnit.MILLISECONDS);
         assertEquals(createdInfo(SourceSink.SOURCE), connectorInfo.result());
 
+        TopicStatus fooStatus = new TopicStatus("foo", CONNECTOR_NAME, 0, 0L);
+        TopicStatus barStatus = new TopicStatus("bar", CONNECTOR_NAME, 0, 0L);
+        
when(statusBackingStore.getAllTopics(CONNECTOR_NAME)).thenReturn(Set.of(fooStatus,
 barStatus));
+
         FutureCallback<Herder.Created<ConnectorInfo>> deleteCallback = new 
FutureCallback<>();
         expectDestroy();
         herder.deleteConnectorConfig(CONNECTOR_NAME, deleteCallback);
         verify(herder).onDeletion(CONNECTOR_NAME);
         verify(statusBackingStore).put(new TaskStatus(new 
ConnectorTaskId(CONNECTOR_NAME, 0), TaskStatus.State.DESTROYED, WORKER_ID, 0));
         verify(statusBackingStore).put(new ConnectorStatus(CONNECTOR_NAME, 
ConnectorStatus.State.DESTROYED, WORKER_ID, 0));
+        verify(statusBackingStore).deleteTopic(CONNECTOR_NAME, "foo");

Review Comment:
   I see this deleteTopic is not actually asserting for this use case ?  
`recreated connector with the same name to inherit the old topics.`



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

Reply via email to