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

nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new c24603188 [CELEBORN-2294][FOLLOWUP] Fix flaky test SparkUtilsSuite
c24603188 is described below

commit c246031889495c45c3e96cf682f2378382411e0e
Author: Xianming Lei <[email protected]>
AuthorDate: Thu Apr 9 14:49:01 2026 +0800

    [CELEBORN-2294][FOLLOWUP] Fix flaky test SparkUtilsSuite
    
    ### What changes were proposed in this pull request?
    Remove racy assertions in the "check if fetch failure task another attempt 
is running or successful" test in SparkUtilsSuite.
    
    ### Why are the changes needed?
    
    After CELEBORN-2294 added a zombie TaskSetManager check in 
shouldReportShuffleFetchFailure, the test became flaky due to a race condition. 
The test calls shouldReportShuffleFetchFailure a second time from the test 
thread, but by that point the FetchFailed has already been processed by Spark's 
DAGScheduler — **the TaskSetManager is either marked as zombie** or the task 
has been removed from taskIdToTaskSetManager. This causes the second call to 
return false, failing the assertion.
    
    ### Does this PR resolve a correctness bug?
    
    No.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    The affected UT: SparkUtilsSuite - check if fetch failure task another 
attempt is running or successful.
    
    Closes #3655 from leixm/FOLLOW-CELEBORN-2294.
    
    Authored-by: Xianming Lei <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
---
 .../scala/org/apache/spark/shuffle/celeborn/SparkUtilsSuite.scala    | 5 -----
 1 file changed, 5 deletions(-)

diff --git 
a/tests/spark-it/src/test/scala/org/apache/spark/shuffle/celeborn/SparkUtilsSuite.scala
 
b/tests/spark-it/src/test/scala/org/apache/spark/shuffle/celeborn/SparkUtilsSuite.scala
index 85a1d815f..b86244636 100644
--- 
a/tests/spark-it/src/test/scala/org/apache/spark/shuffle/celeborn/SparkUtilsSuite.scala
+++ 
b/tests/spark-it/src/test/scala/org/apache/spark/shuffle/celeborn/SparkUtilsSuite.scala
@@ -85,15 +85,10 @@ class SparkUtilsSuite extends AnyFunSuite
         }
         jobThread.start()
 
-        val taskScheduler = sc.taskScheduler.asInstanceOf[TaskSchedulerImpl]
         eventually(timeout(30.seconds), interval(0.milliseconds)) {
           assert(hook.executed.get() == true)
           val reportedTaskId = SparkUtils.lastReportedShuffleFetchFailureTaskId
           assert(reportedTaskId != null)
-          val taskSetManager = SparkUtils.getTaskSetManager(taskScheduler, 
reportedTaskId)
-          assert(taskSetManager != null)
-          assert(SparkUtils.getTaskAttempts(taskSetManager, 
reportedTaskId)._2.size() == 1)
-          assert(SparkUtils.shouldReportShuffleFetchFailure(reportedTaskId))
         }
 
         sparkSession.sparkContext.cancelAllJobs()

Reply via email to