improving test
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/is-sweeper-se-plugin@146908 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
73ab296a85
commit
0df941b18a
|
@ -1,5 +1,8 @@
|
||||||
package org.gcube.informationsystem.sweeper;
|
package org.gcube.informationsystem.sweeper;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -13,19 +16,23 @@ public class ISSweeperPluginTest {
|
||||||
@Test
|
@Test
|
||||||
public void testLaunch() throws ObjectNotFound, Exception{
|
public void testLaunch() throws ObjectNotFound, Exception{
|
||||||
String[] tokens = {
|
String[] tokens = {
|
||||||
ScopedTest.GCUBE,
|
ScopedTest.GCUBE_DEVNEXT_NEXTNEXT,
|
||||||
ScopedTest.GCUBE_DEVSEC,
|
|
||||||
ScopedTest.GCUBE_DEVSEC_DEVVRE,
|
ScopedTest.GCUBE_DEVSEC_DEVVRE,
|
||||||
ScopedTest.GCUBE_DEVNEXT,
|
ScopedTest.GCUBE_DEVNEXT,
|
||||||
ScopedTest.GCUBE_DEVNEXT_NEXTNEXT
|
ScopedTest.GCUBE_DEVSEC,
|
||||||
|
ScopedTest.GCUBE
|
||||||
};
|
};
|
||||||
|
|
||||||
for(String token : tokens){
|
for(String token : tokens){
|
||||||
logger.info("\n\n\n-------------------------------------------------------------------------");
|
logger.info("\n\n\n-------------------------------------------------------------------------");
|
||||||
ScopedTest.setContext(token);
|
ScopedTest.setContext(token);
|
||||||
try{
|
try{
|
||||||
|
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||||
|
inputs.put(ISSweeperPlugin.EXPIRING_MINUTES_TIMEOUT, 30);
|
||||||
|
inputs.put(ISSweeperPlugin.DEAD_DAYS_TIMEOUT, 1);
|
||||||
|
logger.debug("Inputs : {}", inputs);
|
||||||
ISSweeperPlugin isExporterPlugin = new ISSweeperPlugin(new ISSweeperPluginDeclaration());
|
ISSweeperPlugin isExporterPlugin = new ISSweeperPlugin(new ISSweeperPluginDeclaration());
|
||||||
isExporterPlugin.launch(null);
|
isExporterPlugin.launch(inputs);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
logger.error("Sweeper error on {}", ScopeProvider.instance.get(), e);
|
logger.error("Sweeper error on {}", ScopeProvider.instance.get(), e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue