[ 
https://issues.apache.org/jira/browse/FLINK-8961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16411157#comment-16411157
 ] 

ASF GitHub Bot commented on FLINK-8961:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5730#discussion_r176690193
  
    --- Diff: 
flink-tests/src/test/java/org/apache/flink/test/example/client/JobRetrievalITCase.java
 ---
    @@ -21,54 +21,69 @@
     
     import org.apache.flink.api.common.JobID;
     import org.apache.flink.client.deployment.StandaloneClusterId;
    -import org.apache.flink.client.program.ClusterClient;
    -import org.apache.flink.client.program.StandaloneClusterClient;
    +import org.apache.flink.client.program.rest.RestClusterClient;
     import org.apache.flink.configuration.Configuration;
    -import org.apache.flink.runtime.client.JobRetrievalException;
    +import org.apache.flink.configuration.JobManagerOptions;
    +import org.apache.flink.configuration.RestOptions;
     import org.apache.flink.runtime.execution.Environment;
     import org.apache.flink.runtime.jobgraph.JobGraph;
     import org.apache.flink.runtime.jobgraph.JobVertex;
     import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
    -import org.apache.flink.runtime.minicluster.FlinkMiniCluster;
    -import org.apache.flink.runtime.testingUtils.TestingCluster;
    -import org.apache.flink.runtime.testingUtils.TestingJobManagerMessages;
    +import org.apache.flink.runtime.minicluster.MiniCluster;
    +import org.apache.flink.runtime.minicluster.MiniClusterConfiguration;
    +import org.apache.flink.testutils.category.Flip6;
    +import org.apache.flink.util.ExceptionUtils;
     import org.apache.flink.util.TestLogger;
     
    -import akka.actor.ActorRef;
    -import akka.actor.ActorSystem;
    -import akka.testkit.JavaTestKit;
     import org.junit.AfterClass;
    -import org.junit.BeforeClass;
     import org.junit.Test;
    +import org.junit.experimental.categories.Category;
     
    +import java.util.Optional;
     import java.util.concurrent.Semaphore;
     import java.util.concurrent.atomic.AtomicReference;
     
    -import scala.collection.Seq;
    -
     import static org.junit.Assert.assertNotNull;
     import static org.junit.Assert.fail;
     
     /**
      * Tests retrieval of a job from a running Flink cluster.
      */
    +@Category(Flip6.class)
     public class JobRetrievalITCase extends TestLogger {
     
        private static final Semaphore lock = new Semaphore(1);
     
    -   private static FlinkMiniCluster cluster;
    +   private static final MiniCluster CLUSTER;
    +   private static final RestClusterClient<StandaloneClusterId> CLIENT;
     
    -   @BeforeClass
    -   public static void before() {
    -           Configuration configuration = new Configuration();
    -           cluster = new TestingCluster(configuration, false);
    -           cluster.start();
    +   static {
    +           try {
    +           MiniClusterConfiguration clusterConfiguration = new 
MiniClusterConfiguration.Builder()
    +                   .setNumTaskManagers(1)
    +                   .setNumSlotsPerTaskManager(4)
    +                   .build();
    +           CLUSTER = new MiniCluster(clusterConfiguration);
    +           CLUSTER.start();
    +
    +           final Configuration clientConfig = new Configuration();
    +           clientConfig.setString(JobManagerOptions.ADDRESS, "localhost");
    +           clientConfig.setInteger(RestOptions.RETRY_MAX_ATTEMPTS, 0);
    +           clientConfig.setLong(RestOptions.RETRY_DELAY, 0);
    +
    +           CLIENT = new RestClusterClient<>(
    --- End diff --
    
    The existing test explicitly used a `StandaloneClusterClient` for which the 
`RestClusterClient` is the current counter-part.


> Port JobRetrievalITCase to flip6
> --------------------------------
>
>                 Key: FLINK-8961
>                 URL: https://issues.apache.org/jira/browse/FLINK-8961
>             Project: Flink
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 1.5.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Blocker
>             Fix For: 1.5.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to