This is an automated email from the ASF dual-hosted git repository.

wangzhen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 1961389e86 [GLUTEN-10969][FLINK] Set timeout for waiting for task 
output (#10970)
1961389e86 is described below

commit 1961389e86e50394a5b373c4a7b93f5795c5bf48
Author: xinghuayu007 <[email protected]>
AuthorDate: Thu Oct 30 21:11:09 2025 +0800

    [GLUTEN-10969][FLINK] Set timeout for waiting for task output (#10970)
    
    * [Flink][GLUTEN-10969] Set timeout for waiting for task output
    
    * refactor code
    
    * add another timeout
---
 .../table/runtime/stream/common/GlutenStreamingTestBase.java     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/common/GlutenStreamingTestBase.java
 
b/gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/common/GlutenStreamingTestBase.java
index 193d1c8ade..9adae67e21 100644
--- 
a/gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/common/GlutenStreamingTestBase.java
+++ 
b/gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/common/GlutenStreamingTestBase.java
@@ -45,6 +45,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class GlutenStreamingTestBase extends StreamingTestBase {
   private static final Logger LOG = 
LoggerFactory.getLogger(GlutenStreamingTestBase.class);
   private static final String EXECUTION_PLAN_PREIFX = "== Physical Execution 
Plan ==";
+  private static final long timeoutMS = 30000;
 
   @BeforeAll
   public static void setup() throws Exception {
@@ -129,11 +130,19 @@ public class GlutenStreamingTestBase extends 
StreamingTestBase {
       JobClient jobClient = tableResult.getJobClient().get();
       if (deleteResultFile) {
         try {
+          long startTime = System.currentTimeMillis();
           while (!printResultFile.exists()) {
+            if (System.currentTimeMillis() - startTime > timeoutMS) {
+              break;
+            }
             Thread.sleep(10);
           }
           long fileSize = -1L;
+          startTime = System.currentTimeMillis();
           while (printResultFile.length() > fileSize) {
+            if (System.currentTimeMillis() - startTime > timeoutMS) {
+              break;
+            }
             fileSize = printResultFile.length();
             Thread.sleep(3000);
           }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to