Skip to content

Commit f72112c

Browse files
abolliniAdamF42
authored andcommitted
DSC-2333 update test to commit once needed data are build
(cherry picked from commit f9d456231c43c32366fdf49bcb440e7087d285c1)
1 parent c6d481f commit f72112c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

dspace-api/src/main/java/org/dspace/metrics/StoreViewDownloadsCrisMetrics.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.dspace.authorize.AuthorizeException;
3131
import org.dspace.core.Constants;
3232
import org.dspace.core.Context;
33-
import org.dspace.core.Context.Mode;
3433
import org.dspace.discovery.IndexingService;
3534
import org.dspace.discovery.SearchService;
3635
import org.dspace.eperson.EPerson;

dspace-server-webapp/src/test/java/org/dspace/app/rest/CrisMetricsRestRepositoryIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ public void findLinkedEntitiesMetricsTest() throws Exception {
517517
.withMetricType("wosCitation")
518518
// without a metric count "null"
519519
.isLast(true).build();
520-
520+
context.commit();
521521
context.restoreAuthSystemState();
522522

523523
String[] args = new String[]{"update-metrics-in-solr"};
@@ -612,6 +612,7 @@ public void findLinkedEntitiesMetricsAndEmbeddedViewAndDownloadsMetricsTest() th
612612
.withMetricType("wosCitation")
613613
// without a metric count "null"
614614
.isLast(true).build();
615+
context.commit();
615616
context.restoreAuthSystemState();
616617
//save all metrics on solr search core
617618
String[] args = new String[]{"update-metrics-in-solr"};
@@ -702,6 +703,7 @@ public void findLinkedEntitiesMetricsWithViewAndDownloadsMetricsTest() throws Ex
702703
.withRank(30.0)
703704
.isLast(true).build();
704705
context.restoreAuthSystemState();
706+
context.commit();
705707
//save all metrics on solr search core
706708
String[] args = new String[]{"update-metrics-in-solr"};
707709
TestDSpaceRunnableHandler handler = new TestDSpaceRunnableHandler();

0 commit comments

Comments
 (0)