Reorganized tests

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@124251 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-02-17 13:17:31 +00:00
parent 45176b5114
commit e8c79ad211
31 changed files with 60 additions and 74 deletions

View File

@ -6,8 +6,8 @@ package org.gcube.accounting.analytics.persistence;
import org.gcube.accounting.analytics.persistence.couchbase.AccountingPersistenceQueryCouchBase; import org.gcube.accounting.analytics.persistence.couchbase.AccountingPersistenceQueryCouchBase;
import org.gcube.accounting.analytics.persistence.couchdb.AccountingPersistenceQueryCouchDB; import org.gcube.accounting.analytics.persistence.couchdb.AccountingPersistenceQueryCouchDB;
import org.gcube.accounting.persistence.AccountingPersistenceConfiguration; import org.gcube.accounting.persistence.AccountingPersistenceConfiguration;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -23,8 +23,8 @@ import org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord;
import org.gcube.accounting.datamodel.aggregation.AggregatedStorageUsageRecord; import org.gcube.accounting.datamodel.aggregation.AggregatedStorageUsageRecord;
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord; import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord; import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;

View File

@ -8,11 +8,12 @@ import java.util.concurrent.TimeUnit;
import org.gcube.accounting.datamodel.usagerecords.JobUsageRecord; import org.gcube.accounting.datamodel.usagerecords.JobUsageRecord;
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord; import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord; import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
import org.gcube.accounting.datamodel.usagerecords.TaskUsageRecord;
import org.gcube.accounting.persistence.AccountingPersistence; import org.gcube.accounting.persistence.AccountingPersistence;
import org.gcube.accounting.persistence.AccountingPersistenceFactory; import org.gcube.accounting.persistence.AccountingPersistenceFactory;
import org.gcube.documentstore.exception.InvalidValueException; import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions; import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.After; import org.junit.After;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -56,7 +57,7 @@ public class AccountingTest {
AccountingPersistence accountingPersistence = AccountingPersistenceFactory.getPersistence(); AccountingPersistence accountingPersistence = AccountingPersistenceFactory.getPersistence();
for(int i=0; i<1000; i++){ for(int i=0; i<1000; i++){
StorageUsageRecord sur = org.gcube.utils.TestUsageRecord.createTestStorageUsageRecord(); StorageUsageRecord sur = org.gcube.testutility.TestUsageRecord.createTestStorageUsageRecord();
sur.setScope(TestUsageRecord.TEST_SCOPE); sur.setScope(TestUsageRecord.TEST_SCOPE);
accountingPersistence.account(sur); accountingPersistence.account(sur);
} }
@ -86,7 +87,7 @@ public class AccountingTest {
accountingPersistence.account(pur); accountingPersistence.account(pur);
} }
} }
*/
@Test @Test
public void accountingTaskUsageRecordStressTest() throws InvalidValueException, NotAggregatableRecordsExceptions { public void accountingTaskUsageRecordStressTest() throws InvalidValueException, NotAggregatableRecordsExceptions {
@ -99,6 +100,6 @@ public class AccountingTest {
accountingPersistence.account(tur); accountingPersistence.account(tur);
} }
} }
*/
} }

View File

@ -7,7 +7,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.gcube.utils.ScopedTest; 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;

View File

@ -3,7 +3,7 @@ package org.gcube.accounting.couchdb.query;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -6,8 +6,8 @@ package org.gcube.accounting.datamodel.usagerecords;
import java.util.Set; import java.util.Set;
import org.gcube.documentstore.exception.InvalidValueException; import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -6,8 +6,8 @@ package org.gcube.accounting.datamodel.usagerecords;
import java.util.Set; import java.util.Set;
import org.gcube.documentstore.exception.InvalidValueException; import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -5,9 +5,9 @@ package org.gcube.accounting.datamodel.usagerecords;
import java.util.Set; import java.util.Set;
import org.gcube.accounting.testutility.ScopedTest;
import org.gcube.documentstore.exception.InvalidValueException; import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.ScopedTest;
import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -8,12 +8,12 @@ import java.util.Set;
import org.gcube.accounting.datamodel.UsageRecord; import org.gcube.accounting.datamodel.UsageRecord;
import org.gcube.accounting.datamodel.basetypes.AbstractTaskUsageRecord; import org.gcube.accounting.datamodel.basetypes.AbstractTaskUsageRecord;
import org.gcube.accounting.testutility.ScopedTest;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.documentstore.exception.InvalidValueException; import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record; import org.gcube.documentstore.records.Record;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUsageRecord;
import org.gcube.testutility.TestUtility;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;

View File

@ -15,8 +15,8 @@ import org.gcube.common.resources.gcore.ServiceEndpoint.Runtime;
import org.gcube.common.resources.gcore.common.Platform; import org.gcube.common.resources.gcore.common.Platform;
import org.gcube.common.resources.gcore.utils.Group; import org.gcube.common.resources.gcore.utils.Group;
import org.gcube.documentstore.persistence.PersistenceBackend; import org.gcube.documentstore.persistence.PersistenceBackend;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.Assert; import org.junit.Assert;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -17,8 +17,8 @@ import org.gcube.documentstore.persistence.PersistenceCouchBase;
//import org.gcube.documentstore.persistence.PersistenceCouchBase; //import org.gcube.documentstore.persistence.PersistenceCouchBase;
import org.gcube.informationsystem.publisher.RegistryPublisher; import org.gcube.informationsystem.publisher.RegistryPublisher;
import org.gcube.informationsystem.publisher.RegistryPublisherFactory; import org.gcube.informationsystem.publisher.RegistryPublisherFactory;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -16,8 +16,8 @@ import org.gcube.documentstore.persistence.PersistenceBackendFactory;
import org.gcube.documentstore.persistence.PersistenceCouchDB; import org.gcube.documentstore.persistence.PersistenceCouchDB;
import org.gcube.informationsystem.publisher.RegistryPublisher; import org.gcube.informationsystem.publisher.RegistryPublisher;
import org.gcube.informationsystem.publisher.RegistryPublisherFactory; import org.gcube.informationsystem.publisher.RegistryPublisherFactory;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -15,8 +15,8 @@ import org.gcube.documentstore.persistence.PersistenceBackendFactory;
import org.gcube.documentstore.persistence.PersistenceMongoDB; import org.gcube.documentstore.persistence.PersistenceMongoDB;
import org.gcube.informationsystem.publisher.RegistryPublisher; import org.gcube.informationsystem.publisher.RegistryPublisher;
import org.gcube.informationsystem.publisher.RegistryPublisherFactory; import org.gcube.informationsystem.publisher.RegistryPublisherFactory;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -7,11 +7,11 @@ import java.util.concurrent.TimeUnit;
import org.gcube.accounting.datamodel.UsageRecord; import org.gcube.accounting.datamodel.UsageRecord;
import org.gcube.documentstore.exception.InvalidValueException; import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.StressTestUtility; import org.gcube.testutility.StressTestUtility;
import org.gcube.utils.TestOperation; import org.gcube.testutility.TestOperation;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -8,11 +8,11 @@ import java.util.concurrent.TimeUnit;
import org.gcube.accounting.datamodel.UsageRecord; import org.gcube.accounting.datamodel.UsageRecord;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.StressTestUtility; import org.gcube.testutility.StressTestUtility;
import org.gcube.utils.TestOperation; import org.gcube.testutility.TestOperation;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;

View File

@ -7,9 +7,9 @@ import java.net.URL;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.documentstore.records.Record; import org.gcube.documentstore.records.Record;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;

View File

@ -7,8 +7,8 @@ import java.net.URL;
import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.JsonNode;
import org.gcube.documentstore.records.Record; import org.gcube.documentstore.records.Record;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -9,7 +9,7 @@ import org.bson.Document;
import org.gcube.accounting.datamodel.UsageRecord; import org.gcube.accounting.datamodel.UsageRecord;
import org.gcube.accounting.datamodel.basetypes.AbstractStorageUsageRecord.OperationType; import org.gcube.accounting.datamodel.basetypes.AbstractStorageUsageRecord.OperationType;
import org.gcube.documentstore.records.Record; import org.gcube.documentstore.records.Record;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -12,10 +12,10 @@ import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
import org.gcube.documentstore.persistence.PersistenceExecutor; import org.gcube.documentstore.persistence.PersistenceExecutor;
import org.gcube.documentstore.records.AggregatedRecord; import org.gcube.documentstore.records.AggregatedRecord;
import org.gcube.documentstore.records.Record; import org.gcube.documentstore.records.Record;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.gcube.utils.StressTestUtility; import org.gcube.testutility.StressTestUtility;
import org.gcube.utils.TestOperation; import org.gcube.testutility.TestOperation;
import org.gcube.utils.TestUsageRecord; import org.gcube.testutility.TestUsageRecord;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -7,7 +7,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.gcube.utils.ScopedTest; 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;

View File

@ -3,7 +3,7 @@ package org.gcube.informationsystem.sweeper;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.gcube.utils.ScopedTest; import org.gcube.testutility.ScopedTest;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.gcube.utils; package org.gcube.testutility;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileReader; import java.io.FileReader;

View File

@ -1,7 +1,7 @@
/** /**
* *
*/ */
package org.gcube.utils; package org.gcube.testutility;
//import org.gcube.common.authorization.library.provider.SecurityTokenProvider; //import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;

View File

@ -1,7 +1,7 @@
/** /**
* *
*/ */
package org.gcube.utils; package org.gcube.testutility;
import java.util.Calendar; import java.util.Calendar;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;

View File

@ -1,7 +1,7 @@
/** /**
* *
*/ */
package org.gcube.utils; package org.gcube.testutility;
/** /**

View File

@ -1,7 +1,7 @@
/** /**
* *
*/ */
package org.gcube.utils; package org.gcube.testutility;
import java.io.Serializable; import java.io.Serializable;
import java.net.URI; import java.net.URI;

View File

@ -1,7 +1,7 @@
/** /**
* *
*/ */
package org.gcube.utils; package org.gcube.testutility;
import java.io.StringWriter; import java.io.StringWriter;

View File

@ -9,22 +9,7 @@ import java.util.Calendar;
import java.util.Map; import java.util.Map;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
*/ */
import org.gcube.utils.ScopedTest; import org.gcube.testutility.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;
import org.gcube.common.resources.gcore.GCoreEndpoint.Profile.Function.Parameter;
import org.gcube.common.resources.gcore.Resources;
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/ * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/

View File

@ -10,7 +10,7 @@ import java.util.UUID;
import org.acme.HelloWorldPlugin; import org.acme.HelloWorldPlugin;
import org.acme.HelloWorldPluginDeclaration; import org.acme.HelloWorldPluginDeclaration;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
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;

View File

@ -12,7 +12,7 @@ import org.acme.HelloWorldPluginDeclaration;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.clients.ProxyBuilderImpl; import org.gcube.common.clients.ProxyBuilderImpl;
import org.gcube.common.clients.exceptions.DiscoveryException; import org.gcube.common.clients.exceptions.DiscoveryException;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
import org.gcube.vremanagement.executor.api.SmartExecutor; import org.gcube.vremanagement.executor.api.SmartExecutor;
import org.gcube.vremanagement.executor.api.types.LaunchParameter; import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin; import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin;

View File

@ -6,7 +6,7 @@ package org.gcube.vremanagement.executor.client;
import java.util.List; import java.util.List;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.utils.TestUtility; import org.gcube.testutility.TestUtility;
//import org.gcube.dataanalysis.executor.plugin.GenericWorkerPluginDeclaration; //import org.gcube.dataanalysis.executor.plugin.GenericWorkerPluginDeclaration;
import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin; import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin;
import org.gcube.vremanagement.executor.client.plugins.query.SmartExecutorPluginQuery; import org.gcube.vremanagement.executor.client.plugins.query.SmartExecutorPluginQuery;