AHeise commented on a change in pull request #11096: 
[FLINK-16056][runtime][tests] fix CFRO creation in tests
URL: https://github.com/apache/flink/pull/11096#discussion_r379471450
 
 

 ##########
 File path: 
flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingITCase.java
 ##########
 @@ -140,29 +141,25 @@ public void testProgram() throws Exception {
                TestingSinkFunction sink = new TestingSinkFunction();
                content.addSink(sink).setParallelism(1);
 
-               Thread job = new Thread() {
-
-                       @Override
-                       public void run() {
-                               try {
-                                       
env.execute("ContinuousFileProcessingITCase Job.");
-                               } catch (Exception e) {
-                                       Throwable th = e;
-                                       for (int depth = 0; depth < 20; 
depth++) {
-                                               if (th instanceof 
SuccessException) {
-                                                       return;
-                                               } else if (th.getCause() != 
null) {
-                                                       th = th.getCause();
-                                               } else {
-                                                       break;
-                                               }
+               CompletableFuture<Void> jobFuture = new CompletableFuture<>();
+               new Thread(() -> {
+                       try {
+                               env.execute("ContinuousFileProcessingITCase 
Job.");
+                               jobFuture.complete(null);
+                       } catch (Exception e) {
+                               Throwable th = e;
+                               for (int depth = 0; depth < 20; depth++) {
+                                       if (th instanceof SuccessException) {
+                                               return;
 
 Review comment:
   should that also complete future?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


With regards,
Apache Git Services

Reply via email to