From 5fd90193e408cee51bd2cbb35f0f05dc5c849a89 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 6 Feb 2017 08:47:50 +0000 Subject: [PATCH] Fixing tests git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@142230 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 15 +++++++- ...AccountingPersistenceQueryFactoryTest.java | 3 -- ...countingPersistenceQueryCouchBaseTest.java | 1 - ...AccountingPersistenceQueryCouchDBTest.java | 2 -- ...QueryPluginSmartExecutorSchedulerTest.java | 1 - .../aggregation/AggregationSchedulerTest.java | 2 +- ...dexerPluginSmartExecutorSchedulerTest.java | 1 - ...eeperPluginSmartExecutorSchedulerTest.java | 2 +- .../java/org/gcube/test/AccountingTest.java | 36 ------------------- .../executor/client/DefaultExecutorTest.java | 7 ---- 10 files changed, 16 insertions(+), 54 deletions(-) delete mode 100644 src/test/java/org/gcube/test/AccountingTest.java diff --git a/pom.xml b/pom.xml index c5ce0d0..dde6c99 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,20 @@ pom import + + org.gcube.distribution + gcube-smartgears-bom + LATEST + pom + import + + + org.gcube.information-system + information-system-bom + LATEST + pom + import + @@ -159,7 +173,6 @@ org.gcube.core common-scope - [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT) test diff --git a/src/test/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQueryFactoryTest.java b/src/test/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQueryFactoryTest.java index 9979fa0..11de13d 100644 --- a/src/test/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQueryFactoryTest.java +++ b/src/test/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQueryFactoryTest.java @@ -15,8 +15,6 @@ import org.gcube.accounting.analytics.Filter; import org.gcube.accounting.analytics.Info; import org.gcube.accounting.analytics.TemporalConstraint; 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.aggregation.AggregatedServiceUsageRecord; import org.gcube.accounting.datamodel.aggregation.AggregatedStorageUsageRecord; @@ -44,7 +42,6 @@ public class AccountingPersistenceQueryFactoryTest extends ScopedTest { @Before public void before() throws Exception { - super.before(); apq = AccountingPersistenceQueryFactory.getInstance(); } diff --git a/src/test/java/org/gcube/accounting/analytics/persistence/couchbase/AccountingPersistenceQueryCouchBaseTest.java b/src/test/java/org/gcube/accounting/analytics/persistence/couchbase/AccountingPersistenceQueryCouchBaseTest.java index ad67bbb..f493a04 100644 --- a/src/test/java/org/gcube/accounting/analytics/persistence/couchbase/AccountingPersistenceQueryCouchBaseTest.java +++ b/src/test/java/org/gcube/accounting/analytics/persistence/couchbase/AccountingPersistenceQueryCouchBaseTest.java @@ -66,7 +66,6 @@ public class AccountingPersistenceQueryCouchBaseTest extends ScopedTest { @Before public void before() throws Exception{ - super.before(); AccountingPersistenceBackendQueryConfiguration configuration = new AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchBase.class); accountingPersistenceQueryCouchBase = new AccountingPersistenceQueryCouchBase(); diff --git a/src/test/java/org/gcube/accounting/analytics/persistence/couchdb/AccountingPersistenceQueryCouchDBTest.java b/src/test/java/org/gcube/accounting/analytics/persistence/couchdb/AccountingPersistenceQueryCouchDBTest.java index c321308..83c67ef 100644 --- a/src/test/java/org/gcube/accounting/analytics/persistence/couchdb/AccountingPersistenceQueryCouchDBTest.java +++ b/src/test/java/org/gcube/accounting/analytics/persistence/couchdb/AccountingPersistenceQueryCouchDBTest.java @@ -18,7 +18,6 @@ import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQu import org.gcube.accounting.analytics.persistence.AccountingPersistenceQuery; import org.gcube.accounting.analytics.persistence.AccountingPersistenceQueryFactory; import org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord; -import org.gcube.common.scope.api.ScopeProvider; import org.gcube.testutility.ScopedTest; import org.junit.Before; import org.junit.Test; @@ -37,7 +36,6 @@ public class AccountingPersistenceQueryCouchDBTest extends ScopedTest { @Before public void before() throws Exception{ - super.before(); AccountingPersistenceBackendQueryConfiguration configuration = new AccountingPersistenceBackendQueryConfiguration(AccountingPersistenceQueryCouchDB.class); /* diff --git a/src/test/java/org/gcube/accounting/couchdb/query/CouchDBQueryPluginSmartExecutorSchedulerTest.java b/src/test/java/org/gcube/accounting/couchdb/query/CouchDBQueryPluginSmartExecutorSchedulerTest.java index 249fb7f..70c582c 100644 --- a/src/test/java/org/gcube/accounting/couchdb/query/CouchDBQueryPluginSmartExecutorSchedulerTest.java +++ b/src/test/java/org/gcube/accounting/couchdb/query/CouchDBQueryPluginSmartExecutorSchedulerTest.java @@ -35,7 +35,6 @@ public class CouchDBQueryPluginSmartExecutorSchedulerTest extends ScopedTest { @Before 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 proxy = ExecutorPlugin.getExecutorProxy(CouchDBQueryPluginDeclaration.NAME).build(); Assert.assertNotNull(proxy); diff --git a/src/test/java/org/gcube/documentstore/records/aggregation/AggregationSchedulerTest.java b/src/test/java/org/gcube/documentstore/records/aggregation/AggregationSchedulerTest.java index bda35f8..6a35666 100644 --- a/src/test/java/org/gcube/documentstore/records/aggregation/AggregationSchedulerTest.java +++ b/src/test/java/org/gcube/documentstore/records/aggregation/AggregationSchedulerTest.java @@ -30,7 +30,7 @@ public class AggregationSchedulerTest extends ScopedTest { private static final Logger logger = LoggerFactory.getLogger(AggregationSchedulerTest.class); public static AggregationScheduler getAggregationScheduler(){ - return new BufferAggregationScheduler(persistenceExecutor); + return new BufferAggregationScheduler(persistenceExecutor, "TEST"); } public static PersistenceExecutor persistenceExecutor = new PersistenceExecutor(){ diff --git a/src/test/java/org/gcube/informationsystem/socialdataindexer/SocialDataIndexerPluginSmartExecutorSchedulerTest.java b/src/test/java/org/gcube/informationsystem/socialdataindexer/SocialDataIndexerPluginSmartExecutorSchedulerTest.java index 0b3a659..aaec9e3 100644 --- a/src/test/java/org/gcube/informationsystem/socialdataindexer/SocialDataIndexerPluginSmartExecutorSchedulerTest.java +++ b/src/test/java/org/gcube/informationsystem/socialdataindexer/SocialDataIndexerPluginSmartExecutorSchedulerTest.java @@ -8,7 +8,6 @@ import java.util.Map; import java.util.UUID; 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.Scheduling; import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin; diff --git a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java index 0e8fac9..7dcf711 100644 --- a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java +++ b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginSmartExecutorSchedulerTest.java @@ -55,7 +55,7 @@ public class ISSweeperPluginSmartExecutorSchedulerTest extends ScopedTest { } - //@Test + @Test public void cronExpPreviousMustBeTerminated() throws Exception { CronExpression cronExpression = new CronExpression("0 */10 * * * ?"); // every 10 minutes starting from now Scheduling scheduling = new Scheduling(cronExpression, true); diff --git a/src/test/java/org/gcube/test/AccountingTest.java b/src/test/java/org/gcube/test/AccountingTest.java deleted file mode 100644 index 802f4df..0000000 --- a/src/test/java/org/gcube/test/AccountingTest.java +++ /dev/null @@ -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"); - } - -} diff --git a/src/test/java/org/gcube/vremanagement/executor/client/DefaultExecutorTest.java b/src/test/java/org/gcube/vremanagement/executor/client/DefaultExecutorTest.java index d7b5677..5a79989 100644 --- a/src/test/java/org/gcube/vremanagement/executor/client/DefaultExecutorTest.java +++ b/src/test/java/org/gcube/vremanagement/executor/client/DefaultExecutorTest.java @@ -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.PluginNotFoundException; import org.gcube.vremanagement.executor.plugin.PluginState; -import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -37,16 +36,10 @@ public class DefaultExecutorTest extends ScopedTest { @Before public void before() throws Exception{ - super.before(); proxy = ExecutorPlugin.getExecutorProxy().build(); Assert.assertNotNull(proxy); } - @After - public void after() throws Exception{ - super.after(); - } - @Test public void launch() { Map inputs = new HashMap();