Tentative fix for testing of Jenkins

This commit is contained in:
Miriam Baglioni 2021-07-14 11:14:59 +02:00
parent 4cb65bc64a
commit 1cdd09cd8e
1 changed files with 18 additions and 6 deletions

View File

@ -70,9 +70,15 @@ class MAGMappingTest {
implicit val formats = DefaultFormats implicit val formats = DefaultFormats
val conf = new SparkConf().setAppName("test").setMaster("local[2]") val conf = new SparkConf()
val sc = new SparkContext(conf) conf.setMaster("local[*]")
val spark = SparkSession.builder.config(sc.getConf).getOrCreate() conf.set("spark.driver.host", "localhost")
val spark: SparkSession =
SparkSession
.builder()
.appName(getClass.getSimpleName)
.config(conf)
.getOrCreate()
val path = getClass.getResource("magPapers.json").getPath val path = getClass.getResource("magPapers.json").getPath
import org.apache.spark.sql.Encoders import org.apache.spark.sql.Encoders
@ -95,9 +101,15 @@ class MAGMappingTest {
implicit val formats = DefaultFormats implicit val formats = DefaultFormats
val conf = new SparkConf().setAppName("test").setMaster("local[2]") val conf = new SparkConf()
val sc = new SparkContext(conf) conf.setMaster("local[*]")
val spark = SparkSession.builder.config(sc.getConf).getOrCreate() conf.set("spark.driver.host", "localhost")
val spark: SparkSession =
SparkSession
.builder()
.appName(getClass.getSimpleName)
.config(conf)
.getOrCreate()
val path = getClass.getResource("duplicatedMagPapers.json").getPath val path = getClass.getResource("duplicatedMagPapers.json").getPath
import org.apache.spark.sql.Encoders import org.apache.spark.sql.Encoders