Skip to content

Commit

Permalink
[SPARK-11290][STREAMING][TEST-MAVEN] Fix the test for maven build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zsxwing authored and tdas committed Nov 12, 2015
1 parent 767d288 commit f0d3b58
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit f0d3b58

Please sign in to comment.