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 afa9f9679bc0 [SPARK-45527][CORE][TESTS][FOLLOW-UP] Reduce the number of test cases in fraction resource calculation afa9f9679bc0 is described below commit afa9f9679bc01e8afbf7e4a47c203bfcc1a0652a Author: Hyukjin Kwon <gurwls...@apache.org> AuthorDate: Mon Feb 26 18:54:07 2024 -0800 [SPARK-45527][CORE][TESTS][FOLLOW-UP] Reduce the number of test cases in fraction resource calculation ### What changes were proposed in this pull request? There are two more instances to fix in https://github.com/apache/spark/pull/45268 mistakenly missed. This PR fixes both. ### Why are the changes needed? See https://github.com/apache/spark/pull/45268 ### Does this PR introduce _any_ user-facing change? No, test-only. ### How was this patch tested? Manually ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45272 from HyukjinKwon/SPARK-45527-followup2. Authored-by: Hyukjin Kwon <gurwls...@apache.org> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- .../scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala index 3248e64bcc58..df5031e05887 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala @@ -2374,7 +2374,7 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext // 1 executor with 4 GPUS Seq(true, false).foreach { barrierMode => val barrier = if (barrierMode) "barrier" else "" - (1 to 20).foreach { taskNum => + scala.util.Random.shuffle((1 to 20).toList).take(5).foreach { taskNum => val gpuTaskAmount = ResourceAmountUtils.toFractionalResource(ONE_ENTIRE_RESOURCE / taskNum) test(s"SPARK-45527 TaskResourceProfile with task.gpu.amount=${gpuTaskAmount} can " + s"restrict $taskNum $barrier tasks run in the same executor") { @@ -2423,7 +2423,7 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext // 4 executors, each of which has 1 GPU Seq(true, false).foreach { barrierMode => val barrier = if (barrierMode) "barrier" else "" - (1 to 20).foreach { taskNum => + scala.util.Random.shuffle((1 to 20).toList).take(5).foreach { taskNum => val gpuTaskAmount = ResourceAmountUtils.toFractionalResource(ONE_ENTIRE_RESOURCE / taskNum) test(s"SPARK-45527 TaskResourceProfile with task.gpu.amount=${gpuTaskAmount} can " + s"restrict $taskNum $barrier tasks run on the different executor") { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org