Fixing tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@142230 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
184cb662cb
commit
5fd90193e4
15
pom.xml
15
pom.xml
|
@ -31,6 +31,20 @@
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.distribution</groupId>
|
||||||
|
<artifactId>gcube-smartgears-bom</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.information-system</groupId>
|
||||||
|
<artifactId>information-system-bom</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
@ -159,7 +173,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-scope</artifactId>
|
<artifactId>common-scope</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -15,8 +15,6 @@ import org.gcube.accounting.analytics.Filter;
|
||||||
import org.gcube.accounting.analytics.Info;
|
import org.gcube.accounting.analytics.Info;
|
||||||
import org.gcube.accounting.analytics.TemporalConstraint;
|
import org.gcube.accounting.analytics.TemporalConstraint;
|
||||||
import org.gcube.accounting.analytics.TemporalConstraint.AggregationMode;
|
import org.gcube.accounting.analytics.TemporalConstraint.AggregationMode;
|
||||||
import org.gcube.accounting.analytics.exception.NoAvailableScopeException;
|
|
||||||
import org.gcube.accounting.analytics.exception.NoUsableAccountingPersistenceQueryFound;
|
|
||||||
import org.gcube.accounting.datamodel.UsageRecord;
|
import org.gcube.accounting.datamodel.UsageRecord;
|
||||||
import org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord;
|
import org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.aggregation.AggregatedStorageUsageRecord;
|
import org.gcube.accounting.datamodel.aggregation.AggregatedStorageUsageRecord;
|
||||||
|
@ -44,7 +42,6 @@ public class AccountingPersistenceQueryFactoryTest extends ScopedTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() throws Exception {
|
public void before() throws Exception {
|
||||||
super.before();
|
|
||||||
apq = AccountingPersistenceQueryFactory.getInstance();
|
apq = AccountingPersistenceQueryFactory.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,6 @@ public class AccountingPersistenceQueryCouchBaseTest extends ScopedTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() throws Exception{
|
public void before() throws Exception{
|
||||||
super.before();
|
|
||||||
AccountingPersistenceBackendQueryConfiguration configuration = new
|
AccountingPersistenceBackendQueryConfiguration configuration = new
|
||||||
AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchBase.class);
|
AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchBase.class);
|
||||||
accountingPersistenceQueryCouchBase = new AccountingPersistenceQueryCouchBase();
|
accountingPersistenceQueryCouchBase = new AccountingPersistenceQueryCouchBase();
|
||||||
|
|
|
@ -18,7 +18,6 @@ import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQu
|
||||||
import org.gcube.accounting.analytics.persistence.AccountingPersistenceQuery;
|
import org.gcube.accounting.analytics.persistence.AccountingPersistenceQuery;
|
||||||
import org.gcube.accounting.analytics.persistence.AccountingPersistenceQueryFactory;
|
import org.gcube.accounting.analytics.persistence.AccountingPersistenceQueryFactory;
|
||||||
import org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord;
|
import org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
|
||||||
import org.gcube.testutility.ScopedTest;
|
import org.gcube.testutility.ScopedTest;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -37,7 +36,6 @@ public class AccountingPersistenceQueryCouchDBTest extends ScopedTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() throws Exception{
|
public void before() throws Exception{
|
||||||
super.before();
|
|
||||||
AccountingPersistenceBackendQueryConfiguration configuration = new
|
AccountingPersistenceBackendQueryConfiguration configuration = new
|
||||||
AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchDB.class);
|
AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchDB.class);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -35,7 +35,6 @@ public class CouchDBQueryPluginSmartExecutorSchedulerTest extends ScopedTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() throws Exception{
|
public void before() throws Exception{
|
||||||
super.before();
|
|
||||||
ScopeProvider.instance.reset(); // Comment this to run the test. this line has been added to avoid unwanted launch
|
ScopeProvider.instance.reset(); // Comment this to run the test. this line has been added to avoid unwanted launch
|
||||||
proxy = ExecutorPlugin.getExecutorProxy(CouchDBQueryPluginDeclaration.NAME).build();
|
proxy = ExecutorPlugin.getExecutorProxy(CouchDBQueryPluginDeclaration.NAME).build();
|
||||||
Assert.assertNotNull(proxy);
|
Assert.assertNotNull(proxy);
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class AggregationSchedulerTest extends ScopedTest {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(AggregationSchedulerTest.class);
|
private static final Logger logger = LoggerFactory.getLogger(AggregationSchedulerTest.class);
|
||||||
|
|
||||||
public static AggregationScheduler getAggregationScheduler(){
|
public static AggregationScheduler getAggregationScheduler(){
|
||||||
return new BufferAggregationScheduler(persistenceExecutor);
|
return new BufferAggregationScheduler(persistenceExecutor, "TEST");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PersistenceExecutor persistenceExecutor = new PersistenceExecutor(){
|
public static PersistenceExecutor persistenceExecutor = new PersistenceExecutor(){
|
||||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
import org.gcube.testutility.ScopedTest;
|
|
||||||
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.api.types.Scheduling;
|
||||||
import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin;
|
import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ISSweeperPluginSmartExecutorSchedulerTest extends ScopedTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void cronExpPreviousMustBeTerminated() throws Exception {
|
public void cronExpPreviousMustBeTerminated() throws Exception {
|
||||||
CronExpression cronExpression = new CronExpression("0 */10 * * * ?"); // every 10 minutes starting from now
|
CronExpression cronExpression = new CronExpression("0 */10 * * * ?"); // every 10 minutes starting from now
|
||||||
Scheduling scheduling = new Scheduling(cronExpression, true);
|
Scheduling scheduling = new Scheduling(cronExpression, true);
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.test;
|
|
||||||
|
|
||||||
import org.gcube.accounting.persistence.AccountingPersistence;
|
|
||||||
import org.gcube.accounting.persistence.AccountingPersistenceFactory;
|
|
||||||
import org.gcube.testutility.ScopedTest;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class AccountingTest extends ScopedTest {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(AccountingTest.class);
|
|
||||||
|
|
||||||
protected AccountingPersistence accountingPersistence;
|
|
||||||
|
|
||||||
//@Before
|
|
||||||
public void before() throws Exception {
|
|
||||||
super.before();
|
|
||||||
AccountingPersistenceFactory.setFallbackLocation("src/test/resources");
|
|
||||||
accountingPersistence = AccountingPersistenceFactory.getPersistence();
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Test
|
|
||||||
public void testAccounting() throws Exception {
|
|
||||||
logger.trace("Let See");
|
|
||||||
Thread.sleep(1000*60*3);
|
|
||||||
logger.trace("Finished");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -18,7 +18,6 @@ import org.gcube.vremanagement.executor.client.proxies.SmartExecutorProxy;
|
||||||
import org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException;
|
import org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException;
|
||||||
import org.gcube.vremanagement.executor.exception.PluginNotFoundException;
|
import org.gcube.vremanagement.executor.exception.PluginNotFoundException;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginState;
|
import org.gcube.vremanagement.executor.plugin.PluginState;
|
||||||
import org.junit.After;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -37,16 +36,10 @@ public class DefaultExecutorTest extends ScopedTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() throws Exception{
|
public void before() throws Exception{
|
||||||
super.before();
|
|
||||||
proxy = ExecutorPlugin.getExecutorProxy().build();
|
proxy = ExecutorPlugin.getExecutorProxy().build();
|
||||||
Assert.assertNotNull(proxy);
|
Assert.assertNotNull(proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
|
||||||
public void after() throws Exception{
|
|
||||||
super.after();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void launch() {
|
public void launch() {
|
||||||
Map<String, Object> inputs = new HashMap<String, Object>();
|
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||||
|
|
Loading…
Reference in New Issue