From 6989fb9c8ad6c5ee45979e7da82fe1d491927d5e Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 28 May 2020 23:53:24 +0200 Subject: [PATCH] changed the project test according to the newly introduced join with the db project codes --- .../dhp/actionmanager/project/PrepareProjectTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/PrepareProjectTest.java b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/PrepareProjectTest.java index 73bedb741..5ff88e46f 100644 --- a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/PrepareProjectTest.java +++ b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/PrepareProjectTest.java @@ -67,7 +67,7 @@ public class PrepareProjectTest { } @Test - public void numberDistinctProgrammeTest() throws Exception { + public void numberDistinctProjectTest() throws Exception { PrepareProjects .main( new String[] { @@ -76,7 +76,10 @@ public class PrepareProjectTest { "-projectPath", getClass().getResource("/eu/dnetlib/dhp/actionmanager/project/projects_subset.json").getPath(), "-outputPath", - workingDir.toString() + "/preparedProjects" + workingDir.toString() + "/preparedProjects", + "-dbProjectPath", + getClass().getResource("/eu/dnetlib/dhp/actionmanager/project/dbProject").getPath(), + }); final JavaSparkContext sc = new JavaSparkContext(spark.sparkContext()); @@ -85,7 +88,7 @@ public class PrepareProjectTest { .textFile(workingDir.toString() + "/preparedProjects") .map(item -> OBJECT_MAPPER.readValue(item, CSVProject.class)); - Assertions.assertEquals(20, tmp.count()); + Assertions.assertEquals(8, tmp.count()); Dataset verificationDataset = spark.createDataset(tmp.rdd(), Encoders.bean(CSVProject.class));