Skip to content
Snippets Groups Projects
Commit 47ef423f authored by Andrew Or's avatar Andrew Or Committed by Reynold Xin
Browse files

[SPARK-8910] Fix MiMa flaky due to port contention issue

Due to the way MiMa works, we currently start a `SQLContext` pretty early on. This causes us to start a `SparkUI` that attempts to bind to port 4040. Because many tests run in parallel on the Jenkins machines, this  causes port contention sometimes and fails the MiMa tests.

Note that we already disabled the SparkUI for scalatests. However, the MiMa test is run before we even have a chance to load the default scalatest settings, so we need to explicitly disable the UI ourselves.

Author: Andrew Or <andrew@databricks.com>

Closes #7300 from andrewor14/mima-flaky and squashes the following commits:

b55a547 [Andrew Or] Do not enable SparkUI during tests
parent b55499a4
No related branches found
No related tags found
No related merge requests found
...@@ -26,10 +26,10 @@ import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan ...@@ -26,10 +26,10 @@ import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
/** A SQLContext that can be used for local testing. */ /** A SQLContext that can be used for local testing. */
class LocalSQLContext class LocalSQLContext
extends SQLContext( extends SQLContext(
new SparkContext( new SparkContext("local[2]", "TestSQLContext", new SparkConf()
"local[2]", .set("spark.sql.testkey", "true")
"TestSQLContext", // SPARK-8910
new SparkConf().set("spark.sql.testkey", "true"))) { .set("spark.ui.enabled", "false"))) {
override protected[sql] def createSession(): SQLSession = { override protected[sql] def createSession(): SQLSession = {
new this.SQLSession() new this.SQLSession()
......
...@@ -53,9 +53,10 @@ object TestHive ...@@ -53,9 +53,10 @@ object TestHive
"TestSQLContext", "TestSQLContext",
new SparkConf() new SparkConf()
.set("spark.sql.test", "") .set("spark.sql.test", "")
.set( .set("spark.sql.hive.metastore.barrierPrefixes",
"spark.sql.hive.metastore.barrierPrefixes", "org.apache.spark.sql.hive.execution.PairSerDe")
"org.apache.spark.sql.hive.execution.PairSerDe"))) // SPARK-8910
.set("spark.ui.enabled", "false")))
/** /**
* A locally running test instance of Spark's Hive execution engine. * A locally running test instance of Spark's Hive execution engine.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment