From 3f77bfceb009b7a5e6e256603983277f48fc7f36 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 14 Apr 2021 10:03:01 +0200 Subject: [PATCH] fixed test failure on jenkins --- .../eu/dnetlib/doiboost/orcid/MappingORCIDToOAFTest.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/orcid/MappingORCIDToOAFTest.scala b/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/orcid/MappingORCIDToOAFTest.scala index 826591470..cdda3b2af 100644 --- a/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/orcid/MappingORCIDToOAFTest.scala +++ b/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/orcid/MappingORCIDToOAFTest.scala @@ -2,6 +2,7 @@ package eu.dnetlib.doiboost.orcid import com.fasterxml.jackson.databind.ObjectMapper import eu.dnetlib.dhp.schema.oaf.Publication +import org.apache.spark.SparkConf import org.apache.spark.sql.{Dataset, Encoder, Encoders, SparkSession} import org.junit.jupiter.api.Assertions._ import org.junit.jupiter.api.Test @@ -31,11 +32,15 @@ class MappingORCIDToOAFTest { val targetPath: String =s"${testDir.toString}/output/orcidPublication" val workingPath =s"${testDir.toString}/wp/" + val conf = new SparkConf() + conf.setMaster("local[*]") + conf.set("spark.driver.host", "localhost") val spark: SparkSession = SparkSession .builder() .appName(getClass.getSimpleName) - .master("local[*]").getOrCreate() + .config(conf) + .getOrCreate() implicit val mapEncoderPubs: Encoder[Publication] = Encoders.kryo[Publication] import spark.implicits._