Fixed plugin launch
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@152637 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
66e0df8d1b
commit
886009490d
|
@ -38,21 +38,12 @@ public class AggregatorAccountingPluginSmartExecutorSchedulerTest extends Scoped
|
|||
|
||||
}
|
||||
|
||||
private String getPersistTimeParameter(int hour, int minute) {
|
||||
Calendar persistEndTime = Calendar.getInstance();
|
||||
persistEndTime.set(Calendar.HOUR_OF_DAY, hour);
|
||||
persistEndTime.set(Calendar.MINUTE, minute);
|
||||
String persistEndTimeParameter = AccountingAggregatorPlugin.PERSIST_TIME_DATE_FORMAT
|
||||
.format(persistEndTime.getTime());
|
||||
return persistEndTimeParameter;
|
||||
}
|
||||
|
||||
private Map<String, Object> getRecoveryInputs() throws Exception {
|
||||
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||
inputs.put(AccountingAggregatorPlugin.ELABORATION_TYPE_INPUT_PARAMETER, ElaborationType.RECOVERY.name());
|
||||
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_START_TIME_INPUT_PARAMETER, getPersistTimeParameter(8, 0));
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_END_TIME_INPUT_PARAMETER, getPersistTimeParameter(18, 0));
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_START_TIME_INPUT_PARAMETER, Utility.getPersistTimeParameter(8, 0));
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_END_TIME_INPUT_PARAMETER, Utility.getPersistTimeParameter(18, 0));
|
||||
|
||||
return inputs;
|
||||
}
|
||||
|
@ -63,8 +54,8 @@ public class AggregatorAccountingPluginSmartExecutorSchedulerTest extends Scoped
|
|||
|
||||
inputs.put(AccountingAggregatorPlugin.ELABORATION_TYPE_INPUT_PARAMETER, ElaborationType.AGGREGATE.name());
|
||||
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_START_TIME_INPUT_PARAMETER, getPersistTimeParameter(8, 0));
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_END_TIME_INPUT_PARAMETER, getPersistTimeParameter(18, 0));
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_START_TIME_INPUT_PARAMETER, Utility.getPersistTimeParameter(8, 0));
|
||||
inputs.put(AccountingAggregatorPlugin.PERSIST_END_TIME_INPUT_PARAMETER, Utility.getPersistTimeParameter(18, 0));
|
||||
|
||||
inputs.put(AccountingAggregatorPlugin.RECORD_TYPE_INPUT_PARAMETER,
|
||||
ServiceUsageRecord.class.newInstance().getRecordType());
|
||||
|
@ -98,7 +89,7 @@ public class AggregatorAccountingPluginSmartExecutorSchedulerTest extends Scoped
|
|||
}
|
||||
|
||||
@Test
|
||||
public void cronExpPreviousMustBeTerminated() throws Exception {
|
||||
public void aggregate() throws Exception {
|
||||
// Every 15 minutes
|
||||
CronExpression cronExpression = new CronExpression("0 0/15 * 1/1 * ? *");
|
||||
Scheduling scheduling = new Scheduling(cronExpression, false);
|
||||
|
|
Loading…
Reference in New Issue