Skip to content

Commit f8e6c8b

Browse files
NamedObjects: fixed test config, removed warnings
1 parent 53d02f9 commit f8e6c8b

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

job-server-extras/test/spark.jobserver/NamedObjectsSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package spark.jobserver
22

33
import akka.actor.{ ActorRef, ActorSystem, Props }
44
import akka.testkit.{ ImplicitSender, TestKit }
5-
import org.apache.spark.SparkContext
5+
import org.apache.spark.{ SparkContext, SparkConf }
66
import org.apache.spark.sql.{ SQLContext, Row, DataFrame}
77
import org.apache.spark.sql.types._
88
import org.apache.spark.rdd.RDD
@@ -16,7 +16,7 @@ import org.scalatest.{ Matchers, FunSpecLike, FunSpec, BeforeAndAfterAll, Before
1616
class NamedObjectsSpec extends TestKit(ActorSystem("NamedObjectsSpec")) with FunSpecLike
1717
with ImplicitSender with Matchers with BeforeAndAfter with BeforeAndAfterAll {
1818

19-
val sc = new SparkContext("local[4]", getClass.getSimpleName)
19+
val sc = new SparkContext("local[3]", getClass.getSimpleName, new SparkConf)
2020
val sqlContext = new SQLContext(sc)
2121
val namedObjects: NamedObjects = new JobServerNamedObjects(system)
2222

job-server/test/spark.jobserver/JobWithNamedRddsSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package spark.jobserver
22

33
import akka.actor.{ ActorRef, ActorSystem, Props }
44
import akka.testkit.{ ImplicitSender, TestKit }
5-
import org.apache.spark.SparkContext
5+
import org.apache.spark.{ SparkContext, SparkConf }
66
import org.apache.spark.storage.StorageLevel
77
import org.scalatest.{ FunSpecLike, FunSpec, BeforeAndAfterAll, BeforeAndAfter }
88
import com.typesafe.config.Config
@@ -15,7 +15,7 @@ class JobWithNamedRddsSpec extends JobSpecBase(JobManagerSpec.getNewSystem) {
1515

1616
private val emptyConfig = ConfigFactory.parseString("spark.jobserver.named-object-creation-timeout = 60 s")
1717

18-
val sc = new SparkContext("local[4]", getClass.getSimpleName)
18+
val sc = new SparkContext("local[4]", getClass.getSimpleName, new SparkConf)
1919

2020
class TestJob1 extends SparkJob with NamedRddSupport {
2121
def validate(sc: SparkContext, config: Config): SparkJobValidation = SparkJobValid

job-server/test/spark.jobserver/LocalContextSupervisorSpec.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ object LocalContextSupervisorSpec {
2020
jobserver.job-result-cache-size = 100
2121
jobserver.context-creation-timeout = 5 s
2222
jobserver.yarn-context-creation-timeout = 40 s
23+
jobserver.named-object-creation-timeout = 60 s
2324
contexts {
2425
olap-demo {
2526
num-cpu-cores = 4

job-server/test/spark.jobserver/NamedObjectsRDDsOnlySpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package spark.jobserver
22

33
import akka.actor.{ ActorRef, ActorSystem, Props }
44
import akka.testkit.{ ImplicitSender, TestKit }
5-
import org.apache.spark.SparkContext
5+
import org.apache.spark.{ SparkContext, SparkConf }
66
import org.apache.spark.rdd.RDD
77
import org.apache.spark.storage.StorageLevel
88
import org.scalatest.{ Matchers, FunSpecLike, FunSpec, BeforeAndAfterAll, BeforeAndAfter }
@@ -14,7 +14,7 @@ import org.scalatest.{ Matchers, FunSpecLike, FunSpec, BeforeAndAfterAll, Before
1414
class NamedObjectsRDDsOnlySpec extends TestKit(ActorSystem("NamedObjectsSpec")) with FunSpecLike
1515
with ImplicitSender with Matchers with BeforeAndAfter with BeforeAndAfterAll {
1616

17-
val sc = new SparkContext("local[4]", getClass.getSimpleName)
17+
val sc = new SparkContext("local[2]", getClass.getSimpleName, new SparkConf)
1818
val namedObjects: NamedObjects = new JobServerNamedObjects(system)
1919

2020
implicit def rddPersister[T] = new RDDPersister[T]

0 commit comments

Comments
 (0)