Fixing tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@152640 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
886009490d
commit
0d5da0bc19
|
@ -61,7 +61,7 @@ public class AggregatorAccountingPluginSmartExecutorSchedulerTest extends Scoped
|
||||||
ServiceUsageRecord.class.newInstance().getRecordType());
|
ServiceUsageRecord.class.newInstance().getRecordType());
|
||||||
|
|
||||||
// Start Aggregation Date
|
// Start Aggregation Date
|
||||||
Calendar aggregationStartCalendar = Utility.getAggregationStartCalendar(2017, Calendar.JUNE,
|
Calendar aggregationStartCalendar = Utility.getAggregationStartCalendar(2017, Calendar.APRIL,
|
||||||
1);
|
1);
|
||||||
String aggregationStartDate = AccountingAggregatorPlugin.AGGREGATION_START_DATE_DATE_FORMAT
|
String aggregationStartDate = AccountingAggregatorPlugin.AGGREGATION_START_DATE_DATE_FORMAT
|
||||||
.format(aggregationStartCalendar.getTime());
|
.format(aggregationStartCalendar.getTime());
|
||||||
|
@ -69,7 +69,7 @@ public class AggregatorAccountingPluginSmartExecutorSchedulerTest extends Scoped
|
||||||
aggregationStartDate);
|
aggregationStartDate);
|
||||||
inputs.put(AccountingAggregatorPlugin.AGGREGATION_START_DATE_INPUT_PARAMETER, aggregationStartDate);
|
inputs.put(AccountingAggregatorPlugin.AGGREGATION_START_DATE_INPUT_PARAMETER, aggregationStartDate);
|
||||||
|
|
||||||
inputs.put(AccountingAggregatorPlugin.RESTART_FROM_LAST_AGGREGATION_DATE_INPUT_PARAMETER, true);
|
inputs.put(AccountingAggregatorPlugin.RESTART_FROM_LAST_AGGREGATION_DATE_INPUT_PARAMETER, false);
|
||||||
|
|
||||||
return inputs;
|
return inputs;
|
||||||
}
|
}
|
||||||
|
@ -92,12 +92,12 @@ public class AggregatorAccountingPluginSmartExecutorSchedulerTest extends Scoped
|
||||||
public void aggregate() throws Exception {
|
public void aggregate() throws Exception {
|
||||||
// Every 15 minutes
|
// Every 15 minutes
|
||||||
CronExpression cronExpression = new CronExpression("0 0/15 * 1/1 * ? *");
|
CronExpression cronExpression = new CronExpression("0 0/15 * 1/1 * ? *");
|
||||||
Scheduling scheduling = new Scheduling(cronExpression, false);
|
Scheduling scheduling = new Scheduling(cronExpression, true);
|
||||||
scheduling.setGlobal(false);
|
scheduling.setGlobal(false);
|
||||||
|
|
||||||
Map<String, Object> inputs = getAggregateInputs();
|
Map<String, Object> inputs = getAggregateInputs();
|
||||||
|
|
||||||
launch(scheduling, inputs);
|
launch(null, inputs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package org.gcube.accounting.analytics.persistence.couchbase;
|
package org.gcube.accounting.analytics.persistence.couchbase;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.gcube.accounting.aggregator.aggregation.AggregationType;
|
import org.gcube.accounting.aggregator.aggregation.AggregationType;
|
||||||
|
import org.gcube.accounting.aggregator.utility.Utility;
|
||||||
import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration;
|
import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration;
|
||||||
import org.gcube.testutility.ScopedTest;
|
import org.gcube.testutility.ScopedTest;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -43,7 +44,7 @@ public class RemoveOldRecords extends ScopedTest {
|
||||||
AccountingPersistenceQueryCouchBase accountingPersistenceQueryCouchBase = new AccountingPersistenceQueryCouchBase();
|
AccountingPersistenceQueryCouchBase accountingPersistenceQueryCouchBase = new AccountingPersistenceQueryCouchBase();
|
||||||
accountingPersistenceQueryCouchBase.prepareConnection(configuration);
|
accountingPersistenceQueryCouchBase.prepareConnection(configuration);
|
||||||
|
|
||||||
SimpleDateFormat format = new SimpleDateFormat(AggregationType.DAILY.getDateFormatPattern());
|
DateFormat format = Utility.getUTCDateFormat(AggregationType.DAILY.getDateFormatPattern());
|
||||||
|
|
||||||
Calendar start = Calendar.getInstance();
|
Calendar start = Calendar.getInstance();
|
||||||
start.set(Calendar.YEAR, 1970);
|
start.set(Calendar.YEAR, 1970);
|
||||||
|
|
|
@ -203,7 +203,7 @@ public class TestUsageRecord {
|
||||||
|
|
||||||
inputParameters.put(TEST_NESTED_MAP, parameter);
|
inputParameters.put(TEST_NESTED_MAP, parameter);
|
||||||
|
|
||||||
usageRecord.setInputParameters(inputParameters);
|
//usageRecord.setInputParameters(inputParameters);
|
||||||
|
|
||||||
} catch (InvalidValueException e) {
|
} catch (InvalidValueException e) {
|
||||||
logger.error(" ------ You SHOULD NOT SEE THIS MESSAGE. Error Creating a test Usage Record", e);
|
logger.error(" ------ You SHOULD NOT SEE THIS MESSAGE. Error Creating a test Usage Record", e);
|
||||||
|
|
Loading…
Reference in New Issue