Skip to content

Commit

Permalink
[hotfix][yarn][test] Avoid using Mockito for TaskExecutorGateway in Y…
Browse files Browse the repository at this point in the history
…arnResourceManagerTest.
  • Loading branch information
xintongsong authored and tillrohrmann committed Apr 25, 2020
1 parent a864a8e commit 47025f7
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
import org.apache.flink.runtime.rpc.TestingRpcService;
import org.apache.flink.runtime.taskexecutor.SlotReport;
import org.apache.flink.runtime.taskexecutor.SlotStatus;
import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway;
import org.apache.flink.runtime.taskexecutor.TaskExecutorRegistrationSuccess;
import org.apache.flink.runtime.taskexecutor.TestingTaskExecutorGatewayBuilder;
import org.apache.flink.runtime.util.TestingFatalErrorHandler;
import org.apache.flink.util.ExceptionUtils;
import org.apache.flink.util.TestLogger;
Expand Down Expand Up @@ -115,7 +115,6 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;

/**
* General tests for the YARN resource manager component.
Expand Down Expand Up @@ -376,8 +375,7 @@ public void testStopWorker() throws Exception {
verifyFutureCompleted(startContainerAsyncFuture);

// Remote task executor registers with YarnResourceManager.
TaskExecutorGateway mockTaskExecutorGateway = mock(TaskExecutorGateway.class);
rpcService.registerGateway(taskHost, mockTaskExecutorGateway);
rpcService.registerGateway(taskHost, new TestingTaskExecutorGatewayBuilder().createTestingTaskExecutorGateway());

final ResourceManagerGateway rmGateway = resourceManager.getSelfGateway(ResourceManagerGateway.class);

Expand Down

0 comments on commit 47025f7

Please sign in to comment.