flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8961) Port JobRetrievalITCase to flip6
Date Fri, 23 Mar 2018 09:59:00 GMT

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

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

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

    https://github.com/apache/flink/pull/5730#discussion_r176683463
  
    --- 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 could also use a `@ClassRule` where we set the `MiniClusterType` to `FLIP6`.


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

Mime
View raw message