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

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

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

    https://github.com/apache/flink/pull/5892#discussion_r183394773
  
    --- Diff: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java
 ---
    @@ -590,6 +590,12 @@ public boolean accept(File dir, String name) {
                                
LOG.warn("testDetachedPerJobYarnClusterInternal: Exception while deleting the 
JobManager address file", e);
                        }
     
    +                   try {
    +                           
LOG.info("testDetachedPerJobYarnClusterInternal: Closing the yarn client");
    +                           yc.close();
    --- End diff --
    
    according to the docs `stop()` is more appropriate.
    
    ```
      /**
       * A version of stop() that is designed to be usable in Java7 closure
       * clauses.
       * Implementation classes MUST relay this directly to {@link #stop()}
       * @throws IOException never
       * @throws RuntimeException on any failure during the stop operation
       */
      void close() throws IOException;
    ```


> YarnClient should be stopped in 
> YARNSessionCapacitySchedulerITCase#testDetachedPerJobYarnClusterInternal
> --------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-9214
>                 URL: https://issues.apache.org/jira/browse/FLINK-9214
>             Project: Flink
>          Issue Type: Test
>            Reporter: Ted Yu
>            Assignee: vinoyang
>            Priority: Minor
>
> YARNSessionCapacitySchedulerITCase#testDetachedPerJobYarnClusterInternal 
> creates YarnClient without stopping it at the end of the test.
> YarnClient yc should be stopped before returning.



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

Reply via email to