C0urante commented on code in PR #12728:
URL: https://github.com/apache/kafka/pull/12728#discussion_r1383690782


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java:
##########
@@ -223,93 +216,81 @@ public void testCreateConnectorAlreadyExists() throws 
Throwable {
         // Second should fail
         FutureCallback<Herder.Created<ConnectorInfo>> failedCreateCallback = 
new FutureCallback<>();
         herder.putConnectorConfig(CONNECTOR_NAME, config, false, 
failedCreateCallback);
+        verify(loaderSwap, times(2)).close();

Review Comment:
   Can we move this to the end of the test, or at least after invoking 
`failedCreateCallback::get`? Otherwise the test is racy since we're not 
guaranteed that `loaderSwap::close` has actually been invoked twice at this 
point.



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

Reply via email to