XComp commented on a change in pull request #18637: URL: https://github.com/apache/flink/pull/18637#discussion_r801341748
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/cleanup/DefaultResourceCleanerTest.java ########## @@ -19,50 +19,52 @@ package org.apache.flink.runtime.dispatcher.cleanup; import org.apache.flink.api.common.JobID; +import org.apache.flink.core.testutils.FlinkAssertions; import org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter; import org.apache.flink.util.Preconditions; import org.apache.flink.util.concurrent.Executors; +import org.apache.flink.util.concurrent.FixedRetryStrategy; +import org.apache.flink.util.concurrent.FutureUtils; +import org.apache.flink.util.concurrent.RetryStrategy; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.BiFunction; import java.util.function.Consumer; +import static org.apache.flink.core.testutils.FlinkAssertions.STREAM_THROWABLE; import static org.assertj.core.api.Assertions.assertThat; /** {@code DefaultResourceCleanerTest} tests {@link DefaultResourceCleaner}. */ public class DefaultResourceCleanerTest { + private static final Duration TIMEOUT = Duration.ofMillis(100); Review comment: Looks like I was wrong ([build failure](https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=30875&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1&t=24c3384f-1bcb-57b3-224f-51bf973bbee8&l=9374)): We need the timeout. Although, I'm not sure, yet, why. My understanding is due to the test using the `Executors.directExecutors()`, the execution should be handled in a non-concurrent fashion. That makes me believe that the `CompletableFuture` should have finished by the time we reach the asserts 🤔 -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org