Skip to content
Snippets Groups Projects
Commit f0d3b58d authored by Shixiong Zhu's avatar Shixiong Zhu Committed by Tathagata Das
Browse files

[SPARK-11290][STREAMING][TEST-MAVEN] Fix the test for maven build

Should not create SparkContext in the constructor of `TrackStateRDDSuite`. This is a follow up PR for #9256 to fix the test for maven build.

Author: Shixiong Zhu <shixiong@databricks.com>

Closes #9668 from zsxwing/hotfix.
parent 767d288b
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,17 @@ import org.apache.spark.{HashPartitioner, SparkConf, SparkContext, SparkFunSuite
class TrackStateRDDSuite extends SparkFunSuite with BeforeAndAfterAll {
private var sc = new SparkContext(
new SparkConf().setMaster("local").setAppName("TrackStateRDDSuite"))
private var sc: SparkContext = null
override def beforeAll(): Unit = {
sc = new SparkContext(
new SparkConf().setMaster("local").setAppName("TrackStateRDDSuite"))
}
override def afterAll(): Unit = {
sc.stop()
if (sc != null) {
sc.stop()
}
}
test("creation from pair RDD") {
......
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