[SPARK-47196][CORE][BUILD][3.4] Fix core module to succeed SBT tests#45295
Closed
dongjoon-hyun wants to merge 1 commit intoapache:branch-3.4from
Closed
[SPARK-47196][CORE][BUILD][3.4] Fix core module to succeed SBT tests#45295dongjoon-hyun wants to merge 1 commit intoapache:branch-3.4from
core module to succeed SBT tests#45295dongjoon-hyun wants to merge 1 commit intoapache:branch-3.4from
Conversation
Member
Author
|
Could you review this PR, @huaxingao ? |
huaxingao
approved these changes
Feb 27, 2024
Contributor
|
LGTM. Thanks for the fix. |
Member
Author
|
Thank you, @huaxingao ! |
HyukjinKwon
approved these changes
Feb 27, 2024
dongjoon-hyun
added a commit
that referenced
this pull request
Feb 28, 2024
### What changes were proposed in this pull request? This PR aims to fix `core` module to succeed SBT tests by preserving `mockito-core`'s `byte-buddy` test dependency. Currently, `Maven` respects `mockito-core`'s byte-buddy dependency while SBT doesn't. **MAVEN** ``` $ build/mvn dependency:tree -pl core | grep byte-buddy ... [INFO] | +- net.bytebuddy:byte-buddy:jar:1.12.10:test [INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.12.10:test ``` **SBT** ``` $ build/sbt "core/test:dependencyTree" | grep byte-buddy ... [info] | | | | +-net.bytebuddy:byte-buddy:1.12.10 (evicted by: 1.12.18) [info] | | | | +-net.bytebuddy:byte-buddy:1.12.18 ... ``` Note that this happens at `branch-3.4` from Apache Spark 3.4.0~3.4.2 only. branch-3.3/branch-3.5/master are okay. ### Why are the changes needed? **BEFORE** ``` $ build/sbt "core/testOnly *.DAGSchedulerSuite" [info] DAGSchedulerSuite: [info] - [SPARK-3353] parent stage should have lower stage id *** FAILED *** (439 milliseconds) [info] java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null) ... [info] *** 1 SUITE ABORTED *** [info] *** 118 TESTS FAILED *** [error] Error during tests: [error] org.apache.spark.scheduler.DAGSchedulerSuite [error] (core / Test / testOnly) sbt.TestsFailedException: Tests unsuccessful [error] Total time: 48 s, completed Feb 27, 2024, 1:26:27 PM ``` **AFTER** ``` $ build/sbt "core/testOnly *.DAGSchedulerSuite" ... [info] All tests passed. [success] Total time: 22 s, completed Feb 27, 2024, 1:24:34 PM ``` ### Does this PR introduce _any_ user-facing change? No, this is a test-only fix. ### How was this patch tested? Pass the CIs and manual tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45295 from dongjoon-hyun/SPARK-47196. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Member
Author
|
Thank you, @HyukjinKwon . |
snmvaughan
pushed a commit
to snmvaughan/spark
that referenced
this pull request
Mar 26, 2024
### What changes were proposed in this pull request? This PR aims to fix `core` module to succeed SBT tests by preserving `mockito-core`'s `byte-buddy` test dependency. Currently, `Maven` respects `mockito-core`'s byte-buddy dependency while SBT doesn't. **MAVEN** ``` $ build/mvn dependency:tree -pl core | grep byte-buddy ... [INFO] | +- net.bytebuddy:byte-buddy:jar:1.12.10:test [INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.12.10:test ``` **SBT** ``` $ build/sbt "core/test:dependencyTree" | grep byte-buddy ... [info] | | | | +-net.bytebuddy:byte-buddy:1.12.10 (evicted by: 1.12.18) [info] | | | | +-net.bytebuddy:byte-buddy:1.12.18 ... ``` Note that this happens at `branch-3.4` from Apache Spark 3.4.0~3.4.2 only. branch-3.3/branch-3.5/master are okay. ### Why are the changes needed? **BEFORE** ``` $ build/sbt "core/testOnly *.DAGSchedulerSuite" [info] DAGSchedulerSuite: [info] - [SPARK-3353] parent stage should have lower stage id *** FAILED *** (439 milliseconds) [info] java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null) ... [info] *** 1 SUITE ABORTED *** [info] *** 118 TESTS FAILED *** [error] Error during tests: [error] org.apache.spark.scheduler.DAGSchedulerSuite [error] (core / Test / testOnly) sbt.TestsFailedException: Tests unsuccessful [error] Total time: 48 s, completed Feb 27, 2024, 1:26:27 PM ``` **AFTER** ``` $ build/sbt "core/testOnly *.DAGSchedulerSuite" ... [info] All tests passed. [success] Total time: 22 s, completed Feb 27, 2024, 1:24:34 PM ``` ### Does this PR introduce _any_ user-facing change? No, this is a test-only fix. ### How was this patch tested? Pass the CIs and manual tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45295 from dongjoon-hyun/SPARK-47196. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
coremodule to succeed SBT tests by preservingmockito-core'sbyte-buddytest dependency.Currently,
Mavenrespectsmockito-core's byte-buddy dependency while SBT doesn't.MAVEN
SBT
Note that this happens at
branch-3.4from Apache Spark 3.4.0~3.4.2 only. branch-3.3/branch-3.5/master are okay.Why are the changes needed?
BEFORE
AFTER
Does this PR introduce any user-facing change?
No, this is a test-only fix.
How was this patch tested?
Pass the CIs and manual tests.
Was this patch authored or co-authored using generative AI tooling?
No.