diff --git a/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java b/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java index 0e34a05..858e9ad 100644 --- a/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java +++ b/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.Properties; import java.util.SortedSet; import java.util.TreeSet; +import java.util.concurrent.TimeUnit; import org.gcube.common.scope.impl.ScopeBean; import org.gcube.common.scope.impl.ScopeBean.Type; @@ -146,7 +147,7 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { AggregationType aggregationType = AggregationType.MONTHLY; - Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1); + Calendar from = DateUtils.getStartCalendar(2018, Calendar.APRIL, 1); Calendar runbeforeDate = DateUtils.getStartCalendar(2018, Calendar.JUNE, 1); @@ -206,6 +207,8 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { Utils.setContext(ROOT); dbaseManager.insertMonthlyData(start, end, data, true); + Thread.sleep(TimeUnit.SECONDS.toMillis(10)); + from.add(aggregationType.getCalendarField(), 1); }