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

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 11fff05032ec [SPARK-52750][TESTS] Add eventually in flaky test 
LocalTableScanExec
11fff05032ec is described below

commit 11fff05032ecaec8024c9fb0c83e3e3229d2f9e7
Author: alekjarmov <alek.jar...@databricks.com>
AuthorDate: Fri Jul 11 08:10:36 2025 +0900

    [SPARK-52750][TESTS] Add eventually in flaky test LocalTableScanExec
    
    ### What changes were proposed in this pull request?
    
    Add eventually to prevent race conditions with assertion in this test which 
can lead to flaky failures such as this one 
https://github.com/alekjarmov/spark/actions/runs/16173233748/job/45655095879#step:10:4203
 . This is already done in the other assertions of this test.
    
    ### Why are the changes needed?
    
    To not have flaky test failure.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    Test only
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #51425 from alekjarmov/flaky-test.
    
    Lead-authored-by: alekjarmov <alek.jar...@databricks.com>
    Co-authored-by: Alek Jarmov <alek.jar...@gmail.com>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 .../apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
 
b/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
index 4fb57b736185..c5567e0d218c 100644
--- 
a/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
+++ 
b/sql/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectServiceSuite.scala
@@ -920,7 +920,11 @@ class SparkConnectServiceSuite
     }
     def onError(throwable: Throwable): Unit = {
       assert(executeHolder.eventsManager.hasCanceled.isEmpty)
-      assert(executeHolder.eventsManager.hasError.isDefined)
+      Eventually.eventually(EVENT_WAIT_TIMEOUT) {
+        assert(
+          executeHolder.eventsManager.hasError.isDefined,
+          s"Error has not been recorded in events manager within 
$EVENT_WAIT_TIMEOUT")
+      }
     }
     def onCompleted(producedRowCount: Option[Long] = None): Unit = {
       assert(executeHolder.eventsManager.getProducedRowCount == 
producedRowCount)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to