We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6ef038 commit f60772cCopy full SHA for f60772c
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
@@ -736,8 +736,14 @@ private[spark] object SparkSubmitUtils {
736
}
737
738
/** Path of the local Maven cache. */
739
- private[spark] def m2Path: File = new File(System.getProperty("user.home"),
740
- ".m2" + File.separator + "repository")
+ private[spark] def m2Path: File = {
+ if (Utils.isTesting) {
741
+ // test builds delete the maven cache, and this can cause flakiness
742
+ new File(Utils.createTempDir("mvn2"), ".m2" + File.separator + "repository")
743
+ } else {
744
+ new File(System.getProperty("user.home"), ".m2" + File.separator + "repository")
745
+ }
746
747
748
/**
749
* Extracts maven coordinates from a comma-delimited string
0 commit comments