File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
core/src/main/scala/org/apache/spark/deploy/worker Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import org.apache.spark.deploy.ExternalShuffleService
3737import org .apache .spark .deploy .master .{DriverState , Master }
3838import org .apache .spark .deploy .worker .ui .WorkerWebUI
3939import org .apache .spark .internal .{config , Logging }
40+ import org .apache .spark .internal .config .Tests .IS_TESTING
4041import org .apache .spark .metrics .MetricsSystem
4142import org .apache .spark .rpc ._
4243import org .apache .spark .util .{SparkUncaughtExceptionHandler , ThreadUtils , Utils }
@@ -126,7 +127,7 @@ private[deploy] class Worker(
126127 private var connected = false
127128 private val workerId = generateWorkerId()
128129 private val sparkHome =
129- if (Utils .isTesting ) {
130+ if (sys.props.contains( IS_TESTING .key) ) {
130131 assert(sys.props.contains(" spark.test.home" ), " spark.test.home is not set!" )
131132 new File (sys.props(" spark.test.home" ))
132133 } else {
You can’t perform that action at this time.
0 commit comments