Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2982#discussion_r22672882
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -990,11 +990,19 @@ private[spark] object Utils extends Logging {
for ((key, value) <- extraEnvironment) {
environment.put(key, value)
}
+
+ // When testing, expose the parent class path to the child. This is
processed by
+ // compute-classpath.{cmd,sh} and makes all needed jars available to
child processes
+ // when the assembly is built with the "*-provided" profiles enabled.
+ if (sys.props.contains("spark.testing")) {
+ environment.put("SPARK_DIST_CLASSPATH", sys.props("java.class.path"))
--- End diff --
But `SPARK_DIST_CLASSPATH` is not set in the parent (the parent being the
surefire/scalatest runner, in this case). The goal of this code is to add the
classpath built by those (which includes all the dependencies from the pom) to
the child processes without having to modify the test code to manually do it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]