You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2022/06/13 23:39:56 UTC

[spark] branch master updated: [SPARK-39460][CORE][TESTS] Fix `CoarseGrainedSchedulerBackendSuite` to handle fast allocations

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

dongjoon 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 f1a2e3c49e1 [SPARK-39460][CORE][TESTS] Fix `CoarseGrainedSchedulerBackendSuite` to handle fast allocations
f1a2e3c49e1 is described below

commit f1a2e3c49e1bcfe72de0952171f585e95bc4d5cd
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Mon Jun 13 16:39:36 2022 -0700

    [SPARK-39460][CORE][TESTS] Fix `CoarseGrainedSchedulerBackendSuite` to handle fast allocations
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix `CoarseGrainedSchedulerBackendSuite` to handle fast executor allocations.
    
    ### Why are the changes needed?
    
    Currently, it fails when the executor allocation time is the same with the request time.
    ```
    CoarseGrainedSchedulerBackendSuite:
    ...
    - extra resources from executor *** FAILED ***
      1655156664041 was not greater than 1655156664041 Exec allocation and request times don't make sense (CoarseGrainedSchedulerBackendSuite.scala:290)
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    Closes #36860 from dongjoon-hyun/SPARK-39460.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 .../org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/test/scala/org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala
index 0acc2dea2b9..05fecffc647 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala
@@ -287,7 +287,7 @@ class CoarseGrainedSchedulerBackendSuite extends SparkFunSuite with LocalSparkCo
         "Exec allocation and request times don't make sense")
       assert(info.requestTime.get > testStartTime,
         "Exec allocation and request times don't make sense")
-      assert(info.registrationTime.get > info.requestTime.get,
+      assert(info.registrationTime.get >= info.requestTime.get,
         "Exec allocation and request times don't make sense")
     }
   }


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