Skip to content

Commit 48cd05c

Browse files
committed
[HOTFIX] Bind web UI to ephemeral port in DriverSuite.
1 parent e24d3a9 commit 48cd05c

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
@@ -50,7 +50,10 @@ class DriverSuite extends FunSuite with Timeouts {
5050
object DriverWithoutCleanup {
5151
def main(args: Array[String]) {
5252
Utils.configTestLog4j("INFO")
53-
val sc = new SparkContext(args(0), "DriverWithoutCleanup")
53+
// Bind the web UI to an ephemeral port in order to avoid conflicts with other tests running on
54+
// the same machine (we shouldn't just disable the UI here, since that might mask bugs):
55+
val conf = new SparkConf().set("spark.ui.port", "0")
56+
val sc = new SparkContext(args(0), "DriverWithoutCleanup", conf)
5457
sc.parallelize(1 to 100, 4).count()
5558
}
5659
}

0 commit comments

Comments
 (0)