[SPARK-60984][CORE][TESTS] Fix `HighlyCompressedMapStatusBenchmark` failure when `mockito` is not on the classpath #60160
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 257 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.332
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #60160"
general
weight: 0.35
uros-b
What changes were proposed in this pull request?
This PR removes the Mockito dependency from
HighlyCompressedMapStatusBenchmark.SparkEnvfor each case, the benchmark now starts a singlelocal[1]SparkContextand changesspark.shuffle.accurateBlockSkewedFactoronSparkEnv.get.confbefore each case.HighlyCompressedMapStatusreads this value fromSparkEnv.get.confon every call, so the behavior is the same as the mock.SparkContextis stopped before the "Driver heap retained by MapOutputTracker" report, which creates its ownSparkContext.Why are the changes needed?
The benchmark job fails with:
(https://github.com/dongjoon-hyun/spark/actions/runs/41684094207/job/127686502284)
The GitHub Actions benchmark workflow runs
Benchmarksthroughspark-submit --jars <test jars>.mockito-coreis a test-scope dependency ofcore, so it is not on that classpath.build/sbt "core/Test/runMain ..."does include test dependencies, which is why the failure does not reproduce locally.The benchmark was added by SPARK-48290 (a1253377c4d, 2026-10-19). Other benchmarks do not depend on Mockito.
Does this PR introduce _any_ user-facing change?
No. This only changes a benchmark.
How was this patch tested?
Ran the benchmark locally and confirmed that it completes successfully and that the reported numbers (for example, the bytes retained per map task) are the same as before the change:
The benchmark has not been run through
spark-submit --jarsyet, so the GitHub Actions benchmark job needs to confirm the fix.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 5.5