Skip to content

Commit c532acf

Browse files
committed
[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 0128398) Signed-off-by: Josh Rosen <joshrosen@databricks.com>
1 parent 61eb9be commit c532acf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/test/scala/org/apache/spark/DriverSuite.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ class DriverSuite extends FunSuite with Timeouts {
5252
object DriverWithoutCleanup {
5353
def main(args: Array[String]) {
5454
Utils.configTestLog4j("INFO")
55-
val sc = new SparkContext(args(0), "DriverWithoutCleanup")
55+
// Bind the web UI to an ephemeral port in order to avoid conflicts with other tests running on
56+
// the same machine (we shouldn't just disable the UI here, since that might mask bugs):
57+
val conf = new SparkConf().set("spark.ui.port", "0")
58+
val sc = new SparkContext(args(0), "DriverWithoutCleanup", conf)
5659
sc.parallelize(1 to 100, 4).count()
5760
}
5861
}

0 commit comments

Comments
 (0)