Skip to content

Commit

Permalink
[HOTFIX] Bind web UI to ephemeral port in DriverSuite
Browse files Browse the repository at this point in the history
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 0128398)
Signed-off-by: Josh Rosen <joshrosen@databricks.com>

Conflicts:
	core/src/test/scala/org/apache/spark/DriverSuite.scala
  • Loading branch information
JoshRosen committed Jan 1, 2015
1 parent 5cf9477 commit b633559
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/test/scala/org/apache/spark/DriverSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ class DriverSuite extends FunSuite with Timeouts {
object DriverWithoutCleanup {
def main(args: Array[String]) {
Logger.getRootLogger().setLevel(Level.WARN)
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()
}
}

0 comments on commit b633559

Please sign in to comment.