You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "jlprat (via GitHub)" <gi...@apache.org> on 2023/04/21 13:34:22 UTC

[GitHub] [kafka] jlprat commented on a diff in pull request #13575: KAFKA-14905: Reduce flakiness in MM2 ForwardingAdmin test due to admin timeouts

jlprat commented on code in PR #13575:
URL: https://github.com/apache/kafka/pull/13575#discussion_r1173773831


##########
connect/mirror/src/test/java/org/apache/kafka/connect/mirror/clients/admin/FakeForwardingAdminWithLocalMetadata.java:
##########
@@ -38,16 +38,13 @@
 import java.util.Collection;
 import java.util.Map;
 import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 
 /** Customised ForwardingAdmin for testing only.
  * The class create/alter topics, partitions and ACLs in Kafka then store metadata in {@link FakeLocalMetadataStore}.
  * */
 
 public class FakeForwardingAdminWithLocalMetadata extends ForwardingAdmin {
     private static final Logger log = LoggerFactory.getLogger(FakeForwardingAdminWithLocalMetadata.class);
-    private final long timeout = 1000L;

Review Comment:
   Any reason why removing the timeout completely instead of increasing it to some abundantly high number of seconds?
   My time at Akka tells me: never wait forever; always set a timeout, even if it's high.
   What do you think about putting something like 15 seconds? This way if something goes wrong and the future never finished we won't be hanging there forever.



-- 
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-unsubscribe@kafka.apache.org

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