Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/5669#discussion_r177743725
--- Diff:
flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaConsumerTestBase.java
---
@@ -132,8 +140,11 @@
* the same mini cluster. Otherwise, missing slots may happen.
*/
@Before
- public void ensureNoJobIsLingering() throws Exception {
-
JobManagerCommunicationUtils.waitUntilNoJobIsRunning(flink.getLeaderGateway(timeout));
+ public void setClientAndEnsureNoJobIsLingering() throws Exception {
+ client = flink.getClusterClient();
+ while (!getRunningJobs(client).isEmpty()){
--- End diff --
```
while (!getRunningJobs(client).isEmpty()){
Thread.sleep(50);
}
```
This is being copied pasted couple of times. Please extract to common
method. Maybe to an equivalent of `JobManagerCommunicationUtils` or even to
some `TestingClusterClient`?
---