Skip to content
Snippets Groups Projects
Commit 9e02da27 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #812 from shivaram/maven-mllib-tests

Create SparkContext in beforeAll for MLLib tests
parents 65d0d91f ecc9bfe3
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,12 @@ object LogisticRegressionSuite {
}
class LogisticRegressionSuite extends FunSuite with BeforeAndAfterAll with ShouldMatchers {
val sc = new SparkContext("local", "test")
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
......
......@@ -62,7 +62,11 @@ object SVMSuite {
}
class SVMSuite extends FunSuite with BeforeAndAfterAll {
val sc = new SparkContext("local", "test")
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
......
......@@ -27,9 +27,12 @@ import spark.SparkContext._
import org.jblas._
class KMeansSuite extends FunSuite with BeforeAndAfterAll {
val sc = new SparkContext("local", "test")
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
......
......@@ -66,7 +66,11 @@ object ALSSuite {
class ALSSuite extends FunSuite with BeforeAndAfterAll {
val sc = new SparkContext("local", "test")
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
......
......@@ -57,7 +57,12 @@ object LassoSuite {
}
class LassoSuite extends FunSuite with BeforeAndAfterAll {
val sc = new SparkContext("local", "test")
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
......
......@@ -27,7 +27,11 @@ import spark.SparkContext._
class RidgeRegressionSuite extends FunSuite with BeforeAndAfterAll {
val sc = new SparkContext("local", "test")
@transient private var sc: SparkContext = _
override def beforeAll() {
sc = new SparkContext("local", "test")
}
override def afterAll() {
sc.stop()
......
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