Changed classes signature
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@133110 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fe6c2a0609
commit
06ed89289c
2
pom.xml
2
pom.xml
|
@ -74,7 +74,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>couchdb-connector</artifactId>
|
<artifactId>couchdb-connector</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingPersistenceQueryConfigurationTest extends ScopedTest {
|
public class AccountingPersistenceQueryConfigurationTest extends ScopedTest {
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingPersistenceQueryFactoryTest extends ScopedTest {
|
public class AccountingPersistenceQueryFactoryTest extends ScopedTest {
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingPersistenceQueryCouchBaseTest extends ScopedTest {
|
public class AccountingPersistenceQueryCouchBaseTest extends ScopedTest {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingPersistenceQueryCouchDBTest extends ScopedTest {
|
public class AccountingPersistenceQueryCouchDBTest extends ScopedTest {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class DeleteTestDocument extends ScopedTest {
|
public class DeleteTestDocument extends ScopedTest {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class CouchDBQueryPluginSmartExecutorSchedulerTest extends ScopedTest {
|
public class CouchDBQueryPluginSmartExecutorSchedulerTest extends ScopedTest {
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class CouchDBQueryPluginTest extends ScopedTest {
|
public class CouchDBQueryPluginTest extends ScopedTest {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RecordUtilityTest {
|
public class RecordUtilityTest {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingTest {
|
public class AccountingTest {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class JobUsageRecordScopedTest extends ScopedTest {
|
public class JobUsageRecordScopedTest extends ScopedTest {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ServiceUsageRecordScopedTest extends ScopedTest {
|
public class ServiceUsageRecordScopedTest extends ScopedTest {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class StorageUsageRecordScopedTest extends ScopedTest {
|
public class StorageUsageRecordScopedTest extends ScopedTest {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TaskUsageRecordScopedTest extends ScopedTest {
|
public class TaskUsageRecordScopedTest extends ScopedTest {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingPersistenceConfigurationTest extends ScopedTest {
|
public class AccountingPersistenceConfigurationTest extends ScopedTest {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceCouchBaseTest extends ScopedTest {
|
public class PersistenceCouchBaseTest extends ScopedTest {
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceCouchDBTest extends ScopedTest {
|
public class PersistenceCouchDBTest extends ScopedTest {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceMongoDBTest extends ScopedTest {
|
public class PersistenceMongoDBTest extends ScopedTest {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceBackendFactoryTest {
|
public class PersistenceBackendFactoryTest {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceBackendMonitorTest extends ScopedTest {
|
public class PersistenceBackendMonitorTest extends ScopedTest {
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceBackendTest extends ScopedTest {
|
public class PersistenceBackendTest extends ScopedTest {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode;
|
import com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceCouchBaseTest extends ScopedTest {
|
public class PersistenceCouchBaseTest extends ScopedTest {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceCouchDBTest extends ScopedTest {
|
public class PersistenceCouchDBTest extends ScopedTest {
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PersistenceMongoDBTest {
|
public class PersistenceMongoDBTest {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.gcube.testutility.TestUsageRecord;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RenameFileTest extends ScopedTest {
|
public class RenameFileTest extends ScopedTest {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RecordUtilityTest {
|
public class RecordUtilityTest {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AggregationSchedulerTest extends ScopedTest {
|
public class AggregationSchedulerTest extends ScopedTest {
|
||||||
|
|
|
@ -21,9 +21,9 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class SocialDataIndexerPluginSmartExecutorSchedulerTest extends ScopedTest {
|
public class SocialDataIndexerPluginSmartExecutorSchedulerTest {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(SocialDataIndexerPluginSmartExecutorSchedulerTest.class);
|
private static Logger logger = LoggerFactory.getLogger(SocialDataIndexerPluginSmartExecutorSchedulerTest.class);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class SocialDataIndexerPluginSmartExecutorSchedulerTest extends ScopedTes
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() throws Exception{
|
public void before() throws Exception{
|
||||||
super.before();
|
//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
|
||||||
ScopeProvider.instance.set("/gcube");
|
ScopeProvider.instance.set("/gcube");
|
||||||
proxy = ExecutorPlugin.getExecutorProxy("social-data-indexer-plugin").build();
|
proxy = ExecutorPlugin.getExecutorProxy("social-data-indexer-plugin").build();
|
||||||
|
@ -41,10 +41,11 @@ public class SocialDataIndexerPluginSmartExecutorSchedulerTest extends ScopedTes
|
||||||
public UUID scheduleTest(Scheduling scheduling, Long sleepTime) throws Exception {
|
public UUID scheduleTest(Scheduling scheduling, Long sleepTime) throws Exception {
|
||||||
Map<String, Object> inputs = new HashMap<String, Object>();
|
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||||
logger.debug("Inputs : {}", inputs);
|
logger.debug("Inputs : {}", inputs);
|
||||||
|
inputs.put("scope", "gcube");
|
||||||
LaunchParameter parameter = new LaunchParameter("social-data-indexer-plugin", inputs);
|
LaunchParameter parameter = new LaunchParameter("social-data-indexer-plugin", inputs);
|
||||||
parameter.setScheduling(scheduling);
|
parameter.setScheduling(scheduling);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String uuidString = proxy.launch(parameter);
|
String uuidString = proxy.launch(parameter);
|
||||||
return UUID.fromString(uuidString);
|
return UUID.fromString(uuidString);
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class ISSweeperPluginSmartExecutorSchedulerTest extends ScopedTest {
|
public class ISSweeperPluginSmartExecutorSchedulerTest extends ScopedTest {
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class ISSweeperPluginTest extends ScopedTest {
|
public class ISSweeperPluginTest extends ScopedTest {
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RemoveGoodRITest extends ScopedTest {
|
public class RemoveGoodRITest extends ScopedTest {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AccountingTest extends ScopedTest {
|
public class AccountingTest extends ScopedTest {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TempTest {
|
public class TempTest {
|
||||||
|
|
|
@ -3,14 +3,13 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.testutility;
|
package org.gcube.testutility;
|
||||||
|
|
||||||
//import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
|
||||||
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;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ScopedTest {
|
public class ScopedTest {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class StressTestUtility {
|
public class StressTestUtility {
|
||||||
|
|
|
@ -5,7 +5,7 @@ package org.gcube.testutility;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface TestOperation {
|
public interface TestOperation {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TestUsageRecord {
|
public class TestUsageRecord {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TestUtility {
|
public class TestUtility {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||||
import org.gcube.testutility.ScopedTest;
|
import org.gcube.testutility.ScopedTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GCoreEndPointCreationTest extends ScopedTest {
|
public class GCoreEndPointCreationTest extends ScopedTest {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class DefaultExecutorTest extends ScopedTest {
|
public class DefaultExecutorTest extends ScopedTest {
|
||||||
|
@ -110,8 +110,9 @@ public class DefaultExecutorTest extends ScopedTest {
|
||||||
inputs.put("Hello", "World");
|
inputs.put("Hello", "World");
|
||||||
long sleepTime = 20000; // 1000 millisec * 20 = 20 sec
|
long sleepTime = 20000; // 1000 millisec * 20 = 20 sec
|
||||||
inputs.put(HelloWorldPlugin.SLEEP_TIME, sleepTime);
|
inputs.put(HelloWorldPlugin.SLEEP_TIME, sleepTime);
|
||||||
|
int minuteinterval = 2;
|
||||||
// Every 5 minutes, for 12 times (one hour totally).
|
// Every 5 minutes, for 12 times (one hour totally).
|
||||||
Scheduling scheduling = new Scheduling(60*5,12,true);
|
Scheduling scheduling = new Scheduling(60*minuteinterval,12,true);
|
||||||
scheduling.setGlobal(false);
|
scheduling.setGlobal(false);
|
||||||
|
|
||||||
LaunchParameter launchParameter = new LaunchParameter(HelloWorldPluginDeclaration.NAME, inputs, scheduling);
|
LaunchParameter launchParameter = new LaunchParameter(HelloWorldPluginDeclaration.NAME, inputs, scheduling);
|
||||||
|
@ -130,12 +131,12 @@ public class DefaultExecutorTest extends ScopedTest {
|
||||||
Thread.sleep(6000); // 12 sec (total : 22 sec)
|
Thread.sleep(6000); // 12 sec (total : 22 sec)
|
||||||
Assert.assertEquals(PluginState.DONE, proxy.getStateEvolution(executionIdentifier).getPluginState());
|
Assert.assertEquals(PluginState.DONE, proxy.getStateEvolution(executionIdentifier).getPluginState());
|
||||||
|
|
||||||
Thread.sleep(1000*60*5); // After 5 minutes the thread should be active again
|
Thread.sleep(1000*60*minuteinterval); // After 5 minutes the thread should be active again
|
||||||
Assert.assertEquals(PluginState.RUNNING, proxy.getStateEvolution(executionIdentifier).getPluginState());
|
Assert.assertEquals(PluginState.RUNNING, proxy.getStateEvolution(executionIdentifier).getPluginState());
|
||||||
Assert.assertEquals(PluginState.RUNNING, proxy.getIterationStateEvolution(executionIdentifier, 1).getPluginState());
|
Assert.assertEquals(PluginState.RUNNING, proxy.getIterationStateEvolution(executionIdentifier, 1).getPluginState());
|
||||||
|
|
||||||
logger.debug("Trying to stop scheduled task");
|
//logger.debug("Trying to stop scheduled task");
|
||||||
proxy.unSchedule(executionIdentifier, true);
|
//proxy.unSchedule(executionIdentifier, true);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("testOk Exception", e);
|
logger.error("testOk Exception", e);
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class QueriedClientTest {
|
public class QueriedClientTest {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SmartGenericWorkerDiscoveryQuery {
|
public class SmartGenericWorkerDiscoveryQuery {
|
||||||
|
|
Loading…
Reference in New Issue