From commits-return-29859-archive-asf-public=cust-asf.ponee.io@flink.apache.org Tue Apr 14 09:14:48 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 65253180677 for ; Tue, 14 Apr 2020 11:14:48 +0200 (CEST) Received: (qmail 5532 invoked by uid 500); 14 Apr 2020 09:14:47 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 5449 invoked by uid 99); 14 Apr 2020 09:14:47 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2020 09:14:47 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 77B9C819F2; Tue, 14 Apr 2020 09:14:47 +0000 (UTC) Date: Tue, 14 Apr 2020 09:14:47 +0000 To: "commits@flink.apache.org" Subject: [flink] 03/03: [hotifx][tests] Remove dead code in TaskExecutorTest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: azagrebin@apache.org In-Reply-To: <158685568361.27912.10692189216532511754@gitbox.apache.org> References: <158685568361.27912.10692189216532511754@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: flink X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: b91c05953565a7b511ece8c8c0187a44ec9f22a1 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20200414091447.77B9C819F2@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. azagrebin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git commit b91c05953565a7b511ece8c8c0187a44ec9f22a1 Author: Andrey Zagrebin AuthorDate: Thu Apr 9 11:44:31 2020 +0300 [hotifx][tests] Remove dead code in TaskExecutorTest --- .../runtime/taskexecutor/TaskExecutorTest.java | 39 +--------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java index f140667..4d8beb8 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java @@ -57,7 +57,6 @@ import org.apache.flink.runtime.io.network.partition.ResultPartitionID; import org.apache.flink.runtime.io.network.partition.TaskExecutorPartitionTracker; import org.apache.flink.runtime.io.network.partition.TaskExecutorPartitionTrackerImpl; import org.apache.flink.runtime.jobgraph.IntermediateDataSetID; -import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable; import org.apache.flink.runtime.jobmaster.AllocatedSlotInfo; import org.apache.flink.runtime.jobmaster.AllocatedSlotReport; import org.apache.flink.runtime.jobmaster.JMTMRegistrationSuccess; @@ -1957,25 +1956,19 @@ public class TaskExecutorTest extends TestLogger { .build()); jobManagerLeaderRetriever.notifyListener(jobMasterGateway.getAddress(), jobMasterGateway.getFencingToken().toUUID()); - return new TaskExecutorTestingContext(offerSlotsLatch, jobMasterGateway, jobLeaderService, taskSlotTable, taskExecutor); + return new TaskExecutorTestingContext(jobMasterGateway, taskSlotTable, taskExecutor); } private class TaskExecutorTestingContext implements AutoCloseable { - private final OneShotLatch offerSlotsLatch; private final TestingJobMasterGateway jobMasterGateway; - private final JobLeaderService jobLeaderService; private final TaskSlotTable taskSlotTable; private final TestingTaskExecutor taskExecutor; private TaskExecutorTestingContext( - OneShotLatch offerSlotsLatch, TestingJobMasterGateway jobMasterGateway, - JobLeaderService jobLeaderService, TaskSlotTable taskSlotTable, TestingTaskExecutor taskExecutor) { - this.offerSlotsLatch = offerSlotsLatch; this.jobMasterGateway = jobMasterGateway; - this.jobLeaderService = jobLeaderService; this.taskSlotTable = taskSlotTable; this.taskExecutor = taskExecutor; } @@ -1985,36 +1978,6 @@ public class TaskExecutorTest extends TestLogger { taskExecutor.waitUntilStarted(); } - private void startAllocateSlotAndSubmit( - final Class task) throws Exception { - final AllocationID allocationId = new AllocationID(); - - start(); - - taskSlotTable.allocateSlot(0, jobId, allocationId, Time.milliseconds(10000L)); - - // we have to add the job after the TaskExecutor, because otherwise the service has not - // been properly started. - jobLeaderService.addJob(jobId, jobMasterGateway.getAddress()); - offerSlotsLatch.await(); - - taskExecutor - .getSelfGateway(TaskExecutorGateway.class) - .submitTask( - createTaskDeploymentDescriptor(allocationId, task), - jobMasterGateway.getFencingToken(), - timeout); - } - - private TaskDeploymentDescriptor createTaskDeploymentDescriptor( - final AllocationID allocationId, - final Class task) throws IOException { - return TaskDeploymentDescriptorBuilder - .newBuilder(jobId, task) - .setAllocationId(allocationId) - .build(); - } - @Override public void close() throws ExecutionException, InterruptedException, TimeoutException { RpcUtils.terminateRpcEndpoint(taskExecutor, timeout);