|
|
|
@ -41,6 +41,7 @@ import org.gcube.vremanagement.executor.api.types.Scheduling;
|
|
|
|
|
import org.gcube.vremanagement.executor.client.SmartExecutorClient;
|
|
|
|
|
import org.gcube.vremanagement.executor.client.SmartExecutorClientFactory;
|
|
|
|
|
import org.junit.Assert;
|
|
|
|
|
import org.junit.Ignore;
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
import org.quartz.CronExpression;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -70,7 +71,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
return contexts;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Test
|
|
|
|
|
@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void getDimensions() {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
@ -90,6 +92,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void launch() {
|
|
|
|
|
try {
|
|
|
|
@ -105,15 +108,13 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.MEASURE_TYPE_INPUT_PARAMETER, aggregationType.name());
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.GET_VRE_USERS_INPUT_PARAMETER, true);
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.RERUN_INPUT_PARAMETER, true);
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, false);
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.PARTIAL_HARVESTING, false);
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, true);
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.PARTIAL_HARVESTING, true);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Calendar from = DateUtils.getStartCalendar(2020, Calendar.MAY, 1);
|
|
|
|
|
Calendar from = DateUtils.getStartCalendar(2021, Calendar.JANUARY, 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);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
accountingDataHarvesterPlugin.launch(inputs);
|
|
|
|
|
|
|
|
|
@ -124,7 +125,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Test
|
|
|
|
|
@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void launchPluginOnSmartExecutor() {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
@ -146,14 +148,17 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
inputs.put(AccountingDashboardHarvesterPlugin.PARTIAL_HARVESTING, false);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1);
|
|
|
|
|
String fromDate = DateUtils.LAUNCH_DATE_FORMAT.format(from.getTime());
|
|
|
|
|
logger.trace("{} is {}", AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
|
|
|
|
|
inputs.put(AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
|
|
|
|
|
* Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1);
|
|
|
|
|
* String fromDate = DateUtils.LAUNCH_DATE_FORMAT.format(from.getTime());
|
|
|
|
|
* logger.trace("{} is {}",
|
|
|
|
|
* AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
|
|
|
|
|
* inputs.put(AccountingDataHarvesterPlugin. START_DATE_INPUT_PARAMETER,
|
|
|
|
|
* fromDate);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// 3rd of the month for MONTHLY Harvesting at 10:00
|
|
|
|
|
// CronExpression cronExpression = new CronExpression("0 0 10 3 1/1 ? *");
|
|
|
|
|
// CronExpression cronExpression = new CronExpression("0 0 10 3 1/1
|
|
|
|
|
// ? *");
|
|
|
|
|
|
|
|
|
|
// Every day at 10:00 for partial harvesting
|
|
|
|
|
CronExpression cronExpression = new CronExpression("0 0 10 3 1/1 ? *");
|
|
|
|
@ -161,7 +166,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
Scheduling scheduling = new Scheduling(cronExpression);
|
|
|
|
|
scheduling.setGlobal(false);
|
|
|
|
|
LaunchParameter launchParameter = new LaunchParameter(pluginName, inputs, scheduling);
|
|
|
|
|
//LaunchParameter launchParameter = new LaunchParameter(pluginName, inputs);
|
|
|
|
|
// LaunchParameter launchParameter = new LaunchParameter(pluginName,
|
|
|
|
|
// inputs);
|
|
|
|
|
|
|
|
|
|
smartExecutor.launch(launchParameter);
|
|
|
|
|
|
|
|
|
@ -172,7 +178,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Test
|
|
|
|
|
//@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void launchOldData() {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
@ -208,6 +215,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void launchOldDataVREAccessesHarvester() {
|
|
|
|
|
try {
|
|
|
|
@ -249,7 +257,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
if (scopeBean.is(Type.INFRASTRUCTURE)) {
|
|
|
|
|
vreAccessesHarvester = new VREAccessesHarvester(start, end);
|
|
|
|
|
} else {
|
|
|
|
|
// This code should be never used because the scopes are sorted by fullname
|
|
|
|
|
// This code should be never used because the scopes
|
|
|
|
|
// are sorted by fullname
|
|
|
|
|
|
|
|
|
|
ScopeBean parent = scopeBean.enclosingScope();
|
|
|
|
|
while (!parent.is(Type.INFRASTRUCTURE)) {
|
|
|
|
@ -273,7 +282,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
logger.info("Not Harvesting VREs Accesses for {} from {} to {}", context,
|
|
|
|
|
DateUtils.format(start), DateUtils.format(end));
|
|
|
|
|
} else {
|
|
|
|
|
// Collecting Google Analytics Data for VREs Accesses
|
|
|
|
|
// Collecting Google Analytics Data for VREs
|
|
|
|
|
// Accesses
|
|
|
|
|
List<AccountingRecord> harvested = vreAccessesHarvester.getAccountingRecords();
|
|
|
|
|
accountingRecords.addAll(harvested);
|
|
|
|
|
|
|
|
|
@ -287,7 +297,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
accountingRecords);
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new
|
|
|
|
|
// AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
Thread.sleep(TimeUnit.SECONDS.toMillis(10));
|
|
|
|
|
|
|
|
|
@ -305,6 +316,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testScopeBean() throws Exception {
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
@ -320,11 +332,13 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
for (String context : contexts) {
|
|
|
|
|
ScopeBean scopeBean = new ScopeBean(context);
|
|
|
|
|
// logger.debug("FullName {} - Name {}", scopeBean.toString(), scopeBean.name());
|
|
|
|
|
// logger.debug("FullName {} - Name {}", scopeBean.toString(),
|
|
|
|
|
// scopeBean.name());
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
if(scopeBean.is(Type.VRE) && start.equals(DateUtils.getPreviousPeriod(aggregationType, false).getTime())) {
|
|
|
|
|
if (scopeBean.is(Type.VRE)
|
|
|
|
|
&& start.equals(DateUtils.getPreviousPeriod(aggregationType, false).getTime())) {
|
|
|
|
|
logger.info("Harvesting (VRE Users) for {} from {} to {}", context, DateUtils.format(start),
|
|
|
|
|
DateUtils.format(end));
|
|
|
|
|
} else {
|
|
|
|
@ -351,7 +365,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Test
|
|
|
|
|
@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void testVREAccessesHarvester() throws Exception {
|
|
|
|
|
try {
|
|
|
|
|
// AccountingDao dao = getAccountingDao();
|
|
|
|
@ -393,7 +408,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
logger.debug("{}", accountingRecords);
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new
|
|
|
|
|
// AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
@ -401,6 +417,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testVREAccessesHarvesterAll() {
|
|
|
|
|
try {
|
|
|
|
@ -409,8 +426,10 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
// Date start = DateUtils.getStartCalendar(2015, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
// Date end = DateUtils.getStartCalendar(2019, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
// Date start = DateUtils.getStartCalendar(2015, Calendar.FEBRUARY,
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
// Date end = DateUtils.getStartCalendar(2019, Calendar.FEBRUARY,
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
@ -436,7 +455,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
if (scopeBean.is(Type.INFRASTRUCTURE)) {
|
|
|
|
|
vreAccessesHarvester = new VREAccessesHarvester(start, end);
|
|
|
|
|
} else {
|
|
|
|
|
// This code should be never used because the scopes are sorted by fullname
|
|
|
|
|
// This code should be never used because the scopes are
|
|
|
|
|
// sorted by fullname
|
|
|
|
|
|
|
|
|
|
ScopeBean parent = scopeBean.enclosingScope();
|
|
|
|
|
while (!parent.is(Type.INFRASTRUCTURE)) {
|
|
|
|
@ -476,6 +496,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testSocialInteraction() {
|
|
|
|
|
try {
|
|
|
|
@ -524,7 +545,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
logger.debug("Harvest Measures from {} to {} are {}", DateUtils.format(start), DateUtils.format(end),
|
|
|
|
|
accountingRecords);
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new
|
|
|
|
|
// AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
@ -534,6 +556,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testMethodInvocation() {
|
|
|
|
|
try {
|
|
|
|
@ -559,6 +582,51 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testMethodInvocationOldData() {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
AccountingDao dao = getAccountingDao();
|
|
|
|
|
|
|
|
|
|
List<Date> starts = new ArrayList<>();
|
|
|
|
|
starts.add(DateUtils.getStartCalendar(2021, Calendar.APRIL, 1).getTime());
|
|
|
|
|
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
ContextAuthorization contextAuthorization = new ContextAuthorization();
|
|
|
|
|
SortedSet<String> contexts = contextAuthorization.getContexts();
|
|
|
|
|
|
|
|
|
|
List<AccountingRecord> accountingRecords = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (Date start : starts) {
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
|
|
|
|
|
MethodInvocationHarvester methodInvocationHarvester = new MethodInvocationHarvester(start, end);
|
|
|
|
|
|
|
|
|
|
for (String context : contexts) {
|
|
|
|
|
// Setting the token for the context
|
|
|
|
|
ContextTest.setContext(contextAuthorization.getTokenForContext(context));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<AccountingRecord> harvested = methodInvocationHarvester.getAccountingRecords();
|
|
|
|
|
accountingRecords.addAll(harvested);
|
|
|
|
|
|
|
|
|
|
logger.debug("{} - {}", context, harvested);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
logger.debug("Going to insert {}", accountingRecords);
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected AccountingDao getAccountingDao() throws ObjectNotFound, Exception {
|
|
|
|
|
AccountingDao dao = AccountingDao.get();
|
|
|
|
|
|
|
|
|
@ -596,6 +664,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
AccountingDashboardHarvesterPlugin.scopeDescriptor.set(actualScopeDescriptor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testTagMeMethodInvocation() throws Exception {
|
|
|
|
|
try {
|
|
|
|
@ -625,7 +694,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new
|
|
|
|
|
// AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
@ -633,6 +703,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testGetVREUsersForSpecificVRE() {
|
|
|
|
|
try {
|
|
|
|
@ -659,7 +730,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
logger.info("Harvested Data from {} to {} : {}", DateUtils.format(start), DateUtils.format(end), harvested);
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new
|
|
|
|
|
// AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
@ -667,6 +739,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testFilteringGenericResource() {
|
|
|
|
|
try {
|
|
|
|
@ -694,6 +767,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testResourceCatalogueHarvester() {
|
|
|
|
|
try {
|
|
|
|
@ -703,8 +777,10 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
// Date start = DateUtils.getStartCalendar(2015, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
// Date end = DateUtils.getStartCalendar(2019, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
// Date start = DateUtils.getStartCalendar(2015, Calendar.FEBRUARY,
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
// Date end = DateUtils.getStartCalendar(2019, Calendar.FEBRUARY,
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
@ -725,6 +801,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void testCoreServicesHarvester() {
|
|
|
|
|
try {
|
|
|
|
@ -755,13 +832,12 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
end = DateUtils.getEndDateFromStartDate(AggregationType.MONTHLY, start, 1, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
@Test
|
|
|
|
|
public void testCatalogueHarvester() {
|
|
|
|
|
try {
|
|
|
|
@ -775,8 +851,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
Date end = DateUtils.getStartCalendar(2020, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
* Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
* Date start = DateUtils.getPreviousPeriod(measureType, false).getTime(); Date
|
|
|
|
|
* end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
ScopeBean scopeBean = new ScopeBean(context);
|
|
|
|
@ -796,7 +872,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void testDataMethodDownloadHarvester() {
|
|
|
|
|
try {
|
|
|
|
@ -806,8 +882,10 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
// Date start = DateUtils.getStartCalendar(2015, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
// Date end = DateUtils.getStartCalendar(2019, Calendar.FEBRUARY, 1).getTime();
|
|
|
|
|
// Date start = DateUtils.getStartCalendar(2015, Calendar.FEBRUARY,
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
// Date end = DateUtils.getStartCalendar(2019, Calendar.FEBRUARY,
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
@ -844,6 +922,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
public static final String E_LEARNING_AREA_VRE = "/d4science.research-infrastructures.eu/SoBigData/E-Learning_Area";
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
// @Test
|
|
|
|
|
public void addMissingVREAccesses() {
|
|
|
|
|
try {
|
|
|
|
|