C0urante commented on a change in pull request #8069:
URL: https://github.com/apache/kafka/pull/8069#discussion_r420918078



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
##########
@@ -82,6 +82,9 @@
     // we need to consider all possible scenarios this could fail. It might be 
ok to fail with a timeout in rare cases,
     // but currently a worker simply leaving the group can take this long as 
well.
     public static final long REQUEST_TIMEOUT_MS = 90 * 1000;
+    // Mutable for integration testing; otherwise, some tests would take at 
least REQUEST_TIMEOUT_MS

Review comment:
       I mean, we have stuff to do that (the `Time` interface and the 
`MockTime` and `SystemTime` implementations of it) but it doesn't seem like 
it'd be easy to leverage here, since the request timeout is performed by a call 
to `FutureCallback::get`, which relies on `ShutdownLatch::await` under the hood.
   AFAIK we don't have a great way to mock shutdown latch timeouts, but if we 
do, it might not be so bad to do that instead of this hack here.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to