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

dongjoon pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new b01c96ff57da [SPARK-49981][CORE][TESTS] Fix 
`AsyncRDDActionsSuite.FutureAction result, timeout` test case to be robust
b01c96ff57da is described below

commit b01c96ff57dac59608d9d0fdfd8078a2641cb4ec
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Oct 16 07:22:59 2024 -0700

    [SPARK-49981][CORE][TESTS] Fix `AsyncRDDActionsSuite.FutureAction result, 
timeout` test case to be robust
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix `AsyncRDDActionsSuite.FutureAction result, timeout` 
test case to be robust.
    
    ### Why are the changes needed?
    
    To reduce the flakiness in GitHub Action CI. Previously, the sleep time is 
identical to the timeout time. It causes a flakiness in some environments like 
GitHub Action.
    - https://github.com/apache/spark/actions/runs/11298639789/job/31428018075
    ```
    AsyncRDDActionsSuite:
    ...
    - FutureAction result, timeout *** FAILED ***
      Expected exception java.util.concurrent.TimeoutException to be thrown, 
but no exception was thrown (AsyncRDDActionsSuite.scala:206)
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, this is a test-only change.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #48485 from dongjoon-hyun/SPARK-49981.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit a3b91247b32083805fdd50e9f7f46e9a91b8fd8d)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala 
b/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala
index 5e66ca962ea2..c4ef45658ae9 100644
--- a/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala
+++ b/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala
@@ -201,10 +201,10 @@ class AsyncRDDActionsSuite extends SparkFunSuite with 
TimeLimits {
 
   test("FutureAction result, timeout") {
     val f = sc.parallelize(1 to 100, 4)
-              .mapPartitions(itr => { Thread.sleep(20); itr })
+              .mapPartitions(itr => { Thread.sleep(200); itr })
               .countAsync()
     intercept[TimeoutException] {
-      ThreadUtils.awaitResult(f, Duration(20, "milliseconds"))
+      ThreadUtils.awaitResult(f, Duration(2, "milliseconds"))
     }
   }
 


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

Reply via email to