Merged from branch after release 4.13.1
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-dashboard-harvester-se-plugin@177276 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0b43ae3f64
commit
1a3ef7a31d
|
@ -36,9 +36,11 @@ import org.gcube.dataharvest.utils.Utils;
|
||||||
import org.gcube.resourcemanagement.support.server.managers.context.ContextManager;
|
import org.gcube.resourcemanagement.support.server.managers.context.ContextManager;
|
||||||
import org.gcube.vremanagement.executor.api.rest.SmartExecutor;
|
import org.gcube.vremanagement.executor.api.rest.SmartExecutor;
|
||||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||||
|
import org.gcube.vremanagement.executor.api.types.Scheduling;
|
||||||
import org.gcube.vremanagement.executor.client.SmartExecutorClientFactory;
|
import org.gcube.vremanagement.executor.client.SmartExecutorClientFactory;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.quartz.CronExpression;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -120,7 +122,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
// @Test
|
||||||
public void launchPluginOnSmartExecutor() {
|
public void launchPluginOnSmartExecutor() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -136,7 +138,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
||||||
inputs.put(AccountingDataHarvesterPlugin.MEASURE_TYPE_INPUT_PARAMETER, aggregationType.name());
|
inputs.put(AccountingDataHarvesterPlugin.MEASURE_TYPE_INPUT_PARAMETER, aggregationType.name());
|
||||||
inputs.put(AccountingDataHarvesterPlugin.GET_VRE_USERS_INPUT_PARAMETER, true);
|
inputs.put(AccountingDataHarvesterPlugin.GET_VRE_USERS_INPUT_PARAMETER, true);
|
||||||
inputs.put(AccountingDataHarvesterPlugin.RERUN_INPUT_PARAMETER, true);
|
inputs.put(AccountingDataHarvesterPlugin.RERUN_INPUT_PARAMETER, true);
|
||||||
inputs.put(AccountingDataHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, true);
|
inputs.put(AccountingDataHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1);
|
Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1);
|
||||||
|
@ -145,7 +147,11 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
||||||
inputs.put(AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
|
inputs.put(AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LaunchParameter launchParameter = new LaunchParameter(DataHarvestPluginDeclaration.NAME, inputs);
|
//
|
||||||
|
CronExpression cronExpression = new CronExpression("0 0 10 3 1/1 ? *");
|
||||||
|
Scheduling scheduling = new Scheduling(cronExpression);
|
||||||
|
scheduling.setGlobal(false);
|
||||||
|
LaunchParameter launchParameter = new LaunchParameter(DataHarvestPluginDeclaration.NAME, inputs, scheduling);
|
||||||
smartExecutor.launch(launchParameter);
|
smartExecutor.launch(launchParameter);
|
||||||
|
|
||||||
logger.info("End.");
|
logger.info("End.");
|
||||||
|
|
Loading…
Reference in New Issue