You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/10 12:02:32 UTC

[GitHub] [flink] zentol commented on a change in pull request #18893: [FLINK-25813][table-planner] Fix unstable test TableITCase#testCollectWithClose

zentol commented on a change in pull request #18893:
URL: https://github.com/apache/flink/pull/18893#discussion_r823646484



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/TableITCase.scala
##########
@@ -124,16 +124,22 @@ class TableITCase(tableEnvName: String, isStreaming: Boolean) extends AbstractTe
     assertEquals(ResultKind.SUCCESS_WITH_CONTENT, tableResult.getResultKind)
     val it = tableResult.collect()
     it.close()
-    val jobStatus = try {
-      Some(tableResult.getJobClient.get().getJobStatus.get())
-    } catch {
-      // ignore the exception,
-      // because the MiniCluster maybe already been shut down when getting job status
-      case _: Throwable => None
-    }
-    if (jobStatus.isDefined) {
-      assertNotEquals(JobStatus.RUNNING, jobStatus.get)
+
+    val numRetries = 7

Review comment:
       Why use retries when you could wait for the job to terminate via `ClusterClient#requestJobResult()`?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org