Fixed Tests

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@124192 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-02-15 14:17:31 +00:00
parent 7e166c8777
commit b2db1509ce
2 changed files with 13 additions and 17 deletions

View File

@ -1,21 +1,22 @@
/**
*
*/
package org.gcube.documentstore.records.aggregation;
package org.gcube.documentstore.persistence;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.gcube.accounting.datamodel.UsageRecord;
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
import org.gcube.documentstore.persistence.PersistenceExecutor;
import org.gcube.documentstore.records.AggregatedRecord;
import org.gcube.documentstore.records.Record;
import org.gcube.utils.ScopedTest;
import org.gcube.utils.StressTestUtility;
import org.gcube.utils.TestOperation;
import org.gcube.utils.TestUsageRecord;
import org.gcube.utils.TestUtility;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
@ -30,7 +31,8 @@ public class AggregationSchedulerTest extends ScopedTest {
private static final Logger logger = LoggerFactory.getLogger(AggregationSchedulerTest.class);
public static AggregationScheduler getAggregationScheduler(){
return AggregationScheduler.newInstance();
File fallbackFile = PersistenceBackendFactory.getFallbackFile(TestUtility.getScope());
return new BufferAggregationScheduler(new FallbackPersistenceBackend(fallbackFile));
}
public static PersistenceExecutor persistenceExecutor = new PersistenceExecutor(){

View File

@ -2,13 +2,15 @@
*
*/
package org.gcube.vremanagement.executor;
/*
import java.io.StringWriter;
import java.net.URI;
import java.util.Calendar;
import java.util.Map;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
*/
import org.gcube.utils.ScopedTest;
/*
import org.gcube.common.resources.gcore.GCoreEndpoint;
import org.gcube.common.resources.gcore.GCoreEndpoint.Profile;
import org.gcube.common.resources.gcore.GCoreEndpoint.Profile.DeploymentData;
@ -18,27 +20,19 @@ import org.gcube.utils.TestUtility;
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
*/
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*
*/
public class GCoreEndPointCreationTest {
public class GCoreEndPointCreationTest extends ScopedTest {
private static Logger logger = LoggerFactory.getLogger(GCoreEndPointCreationTest.class);
@Before
public void before() throws Exception {
SecurityTokenProvider.instance.set(TestUtility.TOKEN);
}
@After
public void after() {
SecurityTokenProvider.instance.reset();
}
//private static Logger logger = LoggerFactory.getLogger(GCoreEndPointCreationTest.class);
/* protected static GCoreEndpoint createGCoreEndpoint(){
logger.debug("Getting Available Plugins and their own supported capabilities");