Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/19981#discussion_r157315586
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListenerSuite.scala
---
@@ -36,14 +36,23 @@ import org.apache.spark.sql.catalyst.util.quietly
import org.apache.spark.sql.execution.{LeafExecNode, QueryExecution,
SparkPlanInfo, SQLExecution}
import org.apache.spark.sql.execution.metric.{SQLMetric, SQLMetrics}
import org.apache.spark.sql.test.SharedSQLContext
-import org.apache.spark.status.config._
+import org.apache.spark.status.config.LIVE_ENTITY_UPDATE_PERIOD
import org.apache.spark.util.{AccumulatorMetadata, JsonProtocol,
LongAccumulator}
import org.apache.spark.util.kvstore.InMemoryStore
-class SQLListenerSuite extends SparkFunSuite with SharedSQLContext with
JsonTestUtils {
+
+class SQLAppStatusListenerSuite extends SparkFunSuite with
SharedSQLContext with JsonTestUtils {
import testImplicits._
- override protected def sparkConf =
super.sparkConf.set(LIVE_ENTITY_UPDATE_PERIOD, 0L)
+ override def beforeAll(): Unit = {
+ super.beforeAll()
+ sparkContext.conf.set(LIVE_ENTITY_UPDATE_PERIOD, 0L)
--- End diff --
I commented on the other PR where you mentioned this, but I still don't get
what this is changing. I don't see any global state that is being overriden by
`override protected def sparkConf`. This test suite only extends traits (e.g.
`SharedSQLContext` which extends `SharedSparkSession`), and those only keep
suite-level state, not global state.
There are other tests that do the same thing.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]