aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@databricks.com>2015-01-01 15:03:54 -0800
committerJosh Rosen <joshrosen@databricks.com>2015-01-01 15:04:08 -0800
commitda9a4b932c03f9278ae53d80280a014f35c74d5e (patch)
tree829f5fcdea9421442ec2c1c76e8644cb4f508657
parent434ea009cd7efb2c29e88a889e87f501647a7fa6 (diff)
downloadspark-da9a4b932c03f9278ae53d80280a014f35c74d5e.tar.gz
spark-da9a4b932c03f9278ae53d80280a014f35c74d5e.tar.bz2
spark-da9a4b932c03f9278ae53d80280a014f35c74d5e.zip
[HOTFIX] Bind web UI to ephemeral port in DriverSuite
The job launched by DriverSuite should bind the web UI to an ephemeral port, since it looks like port contention in this test has caused a large number of Jenkins failures when many builds are started simultaneously. Our tests already disable the web UI, but this doesn't affect subprocesses launched by our tests. In this case, I've opted to bind to an ephemeral port instead of disabling the UI because disabling features in this test may mask its ability to catch certain bugs. See also: e24d3a9 Author: Josh Rosen <joshrosen@databricks.com> Closes #3873 from JoshRosen/driversuite-webui-port and squashes the following commits: 48cd05c [Josh Rosen] [HOTFIX] Bind web UI to ephemeral port in DriverSuite. (cherry picked from commit 012839807c3dc6e7c8c41ac6e956d52a550bb031) Signed-off-by: Josh Rosen <joshrosen@databricks.com>
-rw-r--r--core/src/test/scala/org/apache/spark/DriverSuite.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/test/scala/org/apache/spark/DriverSuite.scala b/core/src/test/scala/org/apache/spark/DriverSuite.scala
index 5265ba9040..541d8eac80 100644
--- a/core/src/test/scala/org/apache/spark/DriverSuite.scala
+++ b/core/src/test/scala/org/apache/spark/DriverSuite.scala
@@ -50,7 +50,10 @@ class DriverSuite extends FunSuite with Timeouts {
object DriverWithoutCleanup {
def main(args: Array[String]) {
Utils.configTestLog4j("INFO")
- val sc = new SparkContext(args(0), "DriverWithoutCleanup")
+ // Bind the web UI to an ephemeral port in order to avoid conflicts with other tests running on
+ // the same machine (we shouldn't just disable the UI here, since that might mask bugs):
+ val conf = new SparkConf().set("spark.ui.port", "0")
+ val sc = new SparkContext(args(0), "DriverWithoutCleanup", conf)
sc.parallelize(1 to 100, 4).count()
}
}