This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit e2d36ba8f0e8b852f01ba6cef8924a6213a82f29 Author: Chesnay Schepler <[email protected]> AuthorDate: Thu Jul 1 10:16:09 2021 +0200 [hotfix] Replace AskTimeException usages in tests --- .../resourcemanager/slotmanager/DeclarativeSlotManagerTest.java | 3 +-- .../resourcemanager/slotmanager/DefaultSlotStatusSyncerTest.java | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DeclarativeSlotManagerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DeclarativeSlotManagerTest.java index d325bbf..5b826db 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DeclarativeSlotManagerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DeclarativeSlotManagerTest.java @@ -56,7 +56,6 @@ import org.apache.flink.util.function.ThrowingConsumer; import org.apache.flink.shaded.guava18.com.google.common.collect.Iterators; -import akka.pattern.AskTimeoutException; import org.junit.Test; import java.util.ArrayList; @@ -602,7 +601,7 @@ public class DeclarativeSlotManagerTest extends TestLogger { final BlockingQueue<Supplier<CompletableFuture<Acknowledge>>> responseQueue = new ArrayBlockingQueue<>(2); responseQueue.add( - () -> FutureUtils.completedExceptionally(new AskTimeoutException("timeout"))); + () -> FutureUtils.completedExceptionally(new TimeoutException("timeout"))); responseQueue.add( () -> { secondSlotRequestFuture.complete(null); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DefaultSlotStatusSyncerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DefaultSlotStatusSyncerTest.java index 62ecfe3..d00bbd2 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DefaultSlotStatusSyncerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/DefaultSlotStatusSyncerTest.java @@ -36,11 +36,11 @@ import org.apache.flink.runtime.testutils.TestingUtils; import org.apache.flink.util.TestLogger; import org.apache.flink.util.concurrent.FutureUtils; -import akka.pattern.AskTimeoutException; import org.junit.Test; import java.util.Arrays; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeoutException; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; @@ -126,7 +126,7 @@ public class DefaultSlotStatusSyncerTest extends TestLogger { .setRequestSlotFunction( ignored -> FutureUtils.completedExceptionally( - new AskTimeoutException("timeout"))) + new TimeoutException("timeout"))) .createTestingTaskExecutorGateway(); final TaskExecutorConnection taskExecutorConnection = new TaskExecutorConnection(ResourceID.generate(), taskExecutorGateway); @@ -151,7 +151,7 @@ public class DefaultSlotStatusSyncerTest extends TestLogger { try { allocatedFuture.get(); } catch (Exception e) { - assertThat(e.getCause(), instanceOf(AskTimeoutException.class)); + assertThat(e.getCause(), instanceOf(TimeoutException.class)); } assertThat(resourceTracker.getAcquiredResources(jobId), is(empty())); assertThat(
