gharris1727 commented on code in PR #12789:
URL: https://github.com/apache/kafka/pull/12789#discussion_r1009665594


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java:
##########
@@ -192,6 +193,41 @@ public void testConnectorStatus() {
         ConnectorStateInfo state = herder.connectorStatus(connectorName);
 
         assertEquals(connectorName, state.name());
+        assertEquals(ConnectorType.UNKNOWN, state.type());
+        assertEquals("RUNNING", state.connector().state());
+        assertEquals(1, state.tasks().size());
+        assertEquals(workerId, state.connector().workerId());
+
+        ConnectorStateInfo.TaskState taskState = state.tasks().get(0);
+        assertEquals(0, taskState.id());
+        assertEquals("UNASSIGNED", taskState.state());
+        assertEquals(workerId, taskState.workerId());

Review Comment:
   I was just leaving the null config in-place since it was already there, but 
i agree that it's an edge case that shouldn't be the main test.
   
   I've replaced the missing config with a barebones config, and mocked out the 
plugins() calls. I think the other unit tests verifying the other null 
behaviors are sufficient, I won't repeat them for both status and info callers.



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