|
|
|
@ -86,7 +86,8 @@ public class AccountingPersistenceQueryCouchBaseTest {
|
|
|
|
|
public void before() throws Exception{
|
|
|
|
|
|
|
|
|
|
//ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
|
|
|
|
ScopeProvider.instance.set("/gcube/devNext");
|
|
|
|
|
//ScopeProvider.instance.set("/gcube/devNext");
|
|
|
|
|
ScopeProvider.instance.set("/gcube");
|
|
|
|
|
|
|
|
|
|
AccountingPersistenceBackendQueryConfiguration configuration = new
|
|
|
|
|
AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchBase.class);
|
|
|
|
@ -348,7 +349,7 @@ public class AccountingPersistenceQueryCouchBaseTest {
|
|
|
|
|
SortedMap<NumberedFilter, SortedMap<Calendar, Info>> set =
|
|
|
|
|
accountingPersistenceQueryCouchBase.getTopValues(
|
|
|
|
|
clz, temporalConstraint, filters,
|
|
|
|
|
AggregatedServiceUsageRecord.CALLER_HOST, null);
|
|
|
|
|
AggregatedServiceUsageRecord.OPERATION_RESULT, null);
|
|
|
|
|
|
|
|
|
|
logger.debug("Result final{}", set);
|
|
|
|
|
|
|
|
|
@ -357,13 +358,13 @@ public class AccountingPersistenceQueryCouchBaseTest {
|
|
|
|
|
@Test
|
|
|
|
|
public void testTopStorage() throws Exception {
|
|
|
|
|
Calendar startTime = Calendar.getInstance();
|
|
|
|
|
startTime.set(2016, Calendar.AUGUST, 27);
|
|
|
|
|
startTime.set(2017, Calendar.FEBRUARY, 1);
|
|
|
|
|
Calendar endTime = Calendar.getInstance();
|
|
|
|
|
endTime.set(2016, Calendar.SEPTEMBER, 28,23,59);
|
|
|
|
|
endTime.set(2017, Calendar.FEBRUARY, 28,23,59);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Filter> filters = new ArrayList<Filter>();
|
|
|
|
|
|
|
|
|
|
filters.add(new Filter(AggregatedServiceUsageRecord.CONSUMER_ID, "scarponi"));
|
|
|
|
|
TemporalConstraint temporalConstraint =
|
|
|
|
|
new TemporalConstraint(startTime.getTimeInMillis(),
|
|
|
|
|
endTime.getTimeInMillis(), AggregationMode.DAILY);
|
|
|
|
@ -374,7 +375,7 @@ public class AccountingPersistenceQueryCouchBaseTest {
|
|
|
|
|
SortedMap<NumberedFilter, SortedMap<Calendar, Info>> set =
|
|
|
|
|
accountingPersistenceQueryCouchBase.getTopValues(
|
|
|
|
|
clz, temporalConstraint, filters,
|
|
|
|
|
AggregatedStorageUsageRecord.CONSUMER_ID, null);
|
|
|
|
|
AggregatedStorageUsageRecord.OPERATION_TYPE, null);
|
|
|
|
|
|
|
|
|
|
logger.debug("Result final{}", set);
|
|
|
|
|
|
|
|
|
|