You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/03 10:26:01 UTC

[jira] [Commented] (FLINK-8961) Port JobRetrievalITCase to flip6

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

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_r178777980
  
    --- 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();
    --- End diff --
    
    We can only do that if we don't want to rely on `MiniCluster#getRestAddress` for creating the client config.


> 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)