From 0df941b18acd3be8267e0ca645ed8e7cacda608c Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 14 Apr 2017 09:51:20 +0000 Subject: [PATCH] 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 --- .../sweeper/ISSweeperPluginTest.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java index e93110b..e55f402 100644 --- a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java +++ b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java @@ -1,5 +1,8 @@ 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.scope.api.ScopeProvider; import org.junit.Test; @@ -13,19 +16,23 @@ public class ISSweeperPluginTest { @Test public void testLaunch() throws ObjectNotFound, Exception{ String[] tokens = { - ScopedTest.GCUBE, - ScopedTest.GCUBE_DEVSEC, + ScopedTest.GCUBE_DEVNEXT_NEXTNEXT, ScopedTest.GCUBE_DEVSEC_DEVVRE, ScopedTest.GCUBE_DEVNEXT, - ScopedTest.GCUBE_DEVNEXT_NEXTNEXT + ScopedTest.GCUBE_DEVSEC, + ScopedTest.GCUBE }; for(String token : tokens){ logger.info("\n\n\n-------------------------------------------------------------------------"); ScopedTest.setContext(token); try{ + Map inputs = new HashMap(); + inputs.put(ISSweeperPlugin.EXPIRING_MINUTES_TIMEOUT, 30); + inputs.put(ISSweeperPlugin.DEAD_DAYS_TIMEOUT, 1); + logger.debug("Inputs : {}", inputs); ISSweeperPlugin isExporterPlugin = new ISSweeperPlugin(new ISSweeperPluginDeclaration()); - isExporterPlugin.launch(null); + isExporterPlugin.launch(inputs); }catch (Exception e) { logger.error("Sweeper error on {}", ScopeProvider.instance.get(), e); }