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;
```
---