|
|
|
@ -238,7 +238,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
while (from.before(runbeforeDate)) {
|
|
|
|
|
Date start = from.getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(aggregationType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(aggregationType, start, 1);
|
|
|
|
|
|
|
|
|
|
logger.debug("Harvesting from {} to {}", DateUtils.format(start), DateUtils.format(end));
|
|
|
|
|
|
|
|
|
@ -326,7 +326,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getStartCalendar(2018, Calendar.MARCH, 1).getTime();
|
|
|
|
|
// start = DateUtils.getPreviousPeriod(measureType).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(aggregationType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(aggregationType, start, 1);
|
|
|
|
|
|
|
|
|
|
logger.info("\n\n\n");
|
|
|
|
|
|
|
|
|
@ -388,7 +388,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
List<AccountingRecord> accountingRecords = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (Date start : starts) {
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
VREAccessesHarvester vreAccessesHarvester = new VREAccessesHarvester(start, end);
|
|
|
|
@ -432,7 +432,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
AccountingDashboardHarvesterPlugin accountingDataHarvesterPlugin = new AccountingDashboardHarvesterPlugin();
|
|
|
|
|
accountingDataHarvesterPlugin.getConfigParameters();
|
|
|
|
@ -522,7 +522,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
Calendar from = DateUtils.getStartCalendar(2018, Calendar.JUNE, 1);
|
|
|
|
|
Date start = from.getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(aggregationType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(aggregationType, start, 1);
|
|
|
|
|
|
|
|
|
|
logger.debug("Harvesting Social Interaction from {} to {}", DateUtils.format(start), DateUtils.format(end));
|
|
|
|
|
|
|
|
|
@ -570,7 +570,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
MethodInvocationHarvester methodInvocationHarvester = new MethodInvocationHarvester(start, end);
|
|
|
|
|
List<AccountingRecord> accountingRecords = methodInvocationHarvester.getAccountingRecords();
|
|
|
|
@ -590,8 +590,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
AccountingDao dao = getAccountingDao();
|
|
|
|
|
|
|
|
|
|
List<Date> starts = new ArrayList<>();
|
|
|
|
|
starts.add(DateUtils.getStartCalendar(2021, Calendar.APRIL, 1).getTime());
|
|
|
|
|
starts.add(DateUtils.getStartCalendar(2021, Calendar.MAY, 1).getTime());
|
|
|
|
|
starts.add(DateUtils.getStartCalendar(2021, Calendar.JULY, 1).getTime());
|
|
|
|
|
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
@ -609,7 +608,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
List<AccountingRecord> accountingRecords = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (Date start : starts) {
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
MethodInvocationHarvester methodInvocationHarvester = new MethodInvocationHarvester(start, end);
|
|
|
|
|
|
|
|
|
@ -637,7 +636,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
logger.debug("Going to insert {}", accountingRecords);
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
// dao.insertRecords(accountingRecords.toArray(new AccountingRecord[1]));
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("", e);
|
|
|
|
@ -701,7 +700,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
for (Date start : starts) {
|
|
|
|
|
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
TagMeMethodInvocationHarvester methodInvocationHarvester = new TagMeMethodInvocationHarvester(start,
|
|
|
|
|
end);
|
|
|
|
@ -739,7 +738,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
VREUsersHarvester vreUsersHarvester = new VREUsersHarvester(start, end);
|
|
|
|
|
List<AccountingRecord> harvested = vreUsersHarvester.getAccountingRecords();
|
|
|
|
@ -766,7 +765,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
SortedSet<String> contexts = getContexts();
|
|
|
|
|
|
|
|
|
@ -800,7 +799,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
AccountingDashboardHarvesterPlugin accountingDataHarvesterPlugin = new AccountingDashboardHarvesterPlugin();
|
|
|
|
|
accountingDataHarvesterPlugin.getConfigParameters();
|
|
|
|
@ -831,7 +830,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
Date start = DateUtils.getStartCalendar(2017, Calendar.MAY, 1).getTime();
|
|
|
|
|
Date finalEnd = DateUtils.getStartCalendar(2020, Calendar.MAY, 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(AggregationType.MONTHLY, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(AggregationType.MONTHLY, start, 1);
|
|
|
|
|
|
|
|
|
|
ScopeBean scopeBean = new ScopeBean(context);
|
|
|
|
|
logger.debug("FullName {} - Name {}", scopeBean.toString(), scopeBean.name());
|
|
|
|
@ -846,7 +845,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
Thread.sleep(TimeUnit.SECONDS.toMillis(90));
|
|
|
|
|
start = end;
|
|
|
|
|
end = DateUtils.getEndDateFromStartDate(AggregationType.MONTHLY, start, 1, false);
|
|
|
|
|
end = DateUtils.getEndDateFromStartDate(AggregationType.MONTHLY, start, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -905,7 +904,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
// 1).getTime();
|
|
|
|
|
|
|
|
|
|
Date start = DateUtils.getPreviousPeriod(measureType, false).getTime();
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1, false);
|
|
|
|
|
Date end = DateUtils.getEndDateFromStartDate(measureType, start, 1);
|
|
|
|
|
|
|
|
|
|
AccountingDashboardHarvesterPlugin accountingDataHarvesterPlugin = new AccountingDashboardHarvesterPlugin();
|
|
|
|
|
accountingDataHarvesterPlugin.getConfigParameters();
|
|
|
|
|