[ https://issues.apache.org/jira/browse/FLINK-10369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621621#comment-16621621 ]
ASF GitHub Bot commented on FLINK-10369: ---------------------------------------- tillrohrmann 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_r219064427 ########## 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: In this case it works because we use the standalone leader election service which triggers as the first action the job scheduling (before we can request the job). However, I agree that a `NoDataSource` would be better for stability reasons. Will change it. ---------------------------------------------------------------- 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)