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

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

TisonKun commented on a change in pull request #6717: [FLINK-10369][tests] 
Enable YARNITCase to test per job mode deployment
URL: https://github.com/apache/flink/pull/6717#discussion_r218805970
 
 

 ##########
 File path: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNITCase.java
 ##########
 @@ -79,20 +86,45 @@ public void testPerJobMode() throws Exception {
 
                        env.addSource(new InfiniteSource())
                                .shuffle()
-                               .addSink(new DiscardingSink<Integer>());
+                               .addSink(new DiscardingSink<>());
 
                        final JobGraph jobGraph = 
env.getStreamGraph().getJobGraph();
 
                        File testingJar = YarnTestBase.findFile("..", new 
TestingYarnClusterDescriptor.TestJarFinder("flink-yarn-tests"));
 
                        jobGraph.addJar(new 
org.apache.flink.core.fs.Path(testingJar.toURI()));
 
-                       ClusterClient<ApplicationId> clusterClient = 
yarnClusterDescriptor.deployJobCluster(
-                               clusterSpecification,
-                               jobGraph,
-                               true);
+                       ApplicationId applicationId = null;
+                       ClusterClient<ApplicationId> clusterClient = null;
+
+                       try {
+                               clusterClient = 
yarnClusterDescriptor.deployJobCluster(
+                                       clusterSpecification,
+                                       jobGraph,
+                                       false);
+                               applicationId = clusterClient.getClusterId();
+
+                               assertThat(clusterClient, 
is(instanceOf(RestClusterClient.class)));
+                               final RestClusterClient<ApplicationId> 
restClusterClient = (RestClusterClient<ApplicationId>) clusterClient;
+
+                               final CompletableFuture<JobStatus> jobStatus = 
restClusterClient.getJobStatus(jobGraph.getJobID());
+                               assertThat(jobStatus.get(), 
is(JobStatus.RUNNING));
 
 Review comment:
   Should we wait for `RUNNING`? or say would it be unstable when we request 
jobStatus before the job switch to RUNNING?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enable YARNITCase
> -----------------
>
>                 Key: FLINK-10369
>                 URL: https://issues.apache.org/jira/browse/FLINK-10369
>             Project: Flink
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 1.5.3, 1.6.0, 1.7.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> The {{YARNITCase}} is ignored because when it was added it was not possible 
> to terminate the Flink cluster. This has changed now and consequently, we 
> should enable this test.



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

Reply via email to