[SPARK-49983][CORE][TESTS] Fix BarrierTaskContextSuite.successively sync with allGather and barrier test case to be robust
#48487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR aims to fix
BarrierTaskContextSuite.successively sync with allGather and barriertest case to be robust.Why are the changes needed?
The test case asserts the duration of partitions. However, this is flaky because we don't know when a partition is triggered before
barriersync.spark/core/src/test/scala/org/apache/spark/scheduler/BarrierTaskContextSuite.scala
Lines 116 to 118 in 0e75d19
Although we added
TestUtils.waitUntilExecutorsUpat Apache Spark 3.0.0 like the following,let's say a partition starts slowly than
38msand all partitions sleep1sexactly. Then, the test case fails like the following.According to the failure history here (SPARK-49983) and SPARK-31730, the slowness seems to be less than
200mswhen it happens. So, this PR aims to reduce the flakiness by capping the sleep up to 500ms while keeping the1svalidation. There is no test coverage change because this test case focuses on thesuccessively sync with allGather and battier.Does this PR introduce any user-facing change?
No, this is a test-only test case.
How was this patch tested?
Pass the CIs.
Was this patch authored or co-authored using generative AI tooling?
No.