From 1fe73af6bc21d032ac71587f642e4618887fa911 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 15 Sep 2022 18:03:55 +0200 Subject: [PATCH] Fixed code --- .../AccountingDashboardHarvesterPlugin.java | 2 -- .../datamodel/HarvestedDataKey.java | 8 +++---- .../AccountingDataHarvesterPluginTest.java | 21 ++++++++++--------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/gcube/dataharvest/AccountingDashboardHarvesterPlugin.java b/src/main/java/org/gcube/dataharvest/AccountingDashboardHarvesterPlugin.java index 6d2a67e..b31e402 100644 --- a/src/main/java/org/gcube/dataharvest/AccountingDashboardHarvesterPlugin.java +++ b/src/main/java/org/gcube/dataharvest/AccountingDashboardHarvesterPlugin.java @@ -215,9 +215,7 @@ public class AccountingDashboardHarvesterPlugin extends Plugin { getProperties().set(properties); ContextAuthorization contextAuthorization = new ContextAuthorization(); - SortedSet contexts = contextAuthorization.getContexts(); - String root = contexts.first(); Utils.setContext(contextAuthorization.getSecretForContext(root)); diff --git a/src/main/java/org/gcube/dataharvest/datamodel/HarvestedDataKey.java b/src/main/java/org/gcube/dataharvest/datamodel/HarvestedDataKey.java index b5f0035..cd0feaa 100644 --- a/src/main/java/org/gcube/dataharvest/datamodel/HarvestedDataKey.java +++ b/src/main/java/org/gcube/dataharvest/datamodel/HarvestedDataKey.java @@ -25,10 +25,10 @@ public enum HarvestedDataKey { ACCESSES("VRE Accesses"), USERS("VRE Users"), DATA_METHOD_DOWNLOAD("Data/Method download"), - NEW_CATALOGUE_METHODS("New Catalogue Methods"), - NEW_CATALOGUE_DATASETS("New Catalogue Datasets"), - NEW_CATALOGUE_DELIVERABLES("New Catalogue Deliverables"), - NEW_CATALOGUE_APPLICATIONS("New Catalogue Applications"), +// NEW_CATALOGUE_METHODS("New Catalogue Methods"), +// NEW_CATALOGUE_DATASETS("New Catalogue Datasets"), +// NEW_CATALOGUE_DELIVERABLES("New Catalogue Deliverables"), +// NEW_CATALOGUE_APPLICATIONS("New Catalogue Applications"), SOCIAL_POSTS("VRE Social Interations Posts"), SOCIAL_REPLIES("VRE Social Interations Replies"), SOCIAL_LIKES("VRE Social Interations Likes"), diff --git a/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java b/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java index 9f920c7..c2e184a 100644 --- a/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java +++ b/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java @@ -92,8 +92,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { } } - //@Ignore - @Test + @Ignore + //@Test public void launch() { try { @@ -109,9 +109,9 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { inputs.put(AccountingDashboardHarvesterPlugin.GET_VRE_USERS_INPUT_PARAMETER, true); inputs.put(AccountingDashboardHarvesterPlugin.RERUN_INPUT_PARAMETER, true); inputs.put(AccountingDashboardHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, true); - inputs.put(AccountingDashboardHarvesterPlugin.PARTIAL_HARVESTING, false); + inputs.put(AccountingDashboardHarvesterPlugin.PARTIAL_HARVESTING, true); - Calendar from = DateUtils.getStartCalendar(2022, Calendar.AUGUST, 1); + Calendar from = DateUtils.getStartCalendar(2022, Calendar.SEPTEMBER, 1); String fromDate = DateUtils.LAUNCH_DATE_FORMAT.format(from.getTime()); logger.trace("{} is {}", AccountingDashboardHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate); inputs.put(AccountingDashboardHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate); @@ -178,8 +178,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { } } - //@Ignore - @Test + @Ignore + // @Test public void launchOldData() { try { @@ -366,7 +366,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { } @Ignore - @Test + // @Test public void testVREAccessesHarvester() throws Exception { try { // AccountingDao dao = getAccountingDao(); @@ -580,7 +580,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { } } - @Test + @Ignore + //@Test public void testMethodInvocationOldData() { try { @@ -813,7 +814,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { } @Ignore - @Test + // @Test public void testCoreServicesHarvester() { try { @@ -849,7 +850,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { } @Ignore - @Test + // @Test public void testCatalogueHarvester() { try {