diff --git a/src/test/java/org/gcube/informationsystem/exporter/ISExporterPluginSmartExecutorSchedulerTest.java b/src/test/java/org/gcube/informationsystem/exporter/ISExporterPluginSmartExecutorSchedulerTest.java index ef9788c..72fe9a0 100644 --- a/src/test/java/org/gcube/informationsystem/exporter/ISExporterPluginSmartExecutorSchedulerTest.java +++ b/src/test/java/org/gcube/informationsystem/exporter/ISExporterPluginSmartExecutorSchedulerTest.java @@ -13,7 +13,6 @@ import org.gcube.vremanagement.executor.api.types.Scheduling; import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin; import org.gcube.vremanagement.executor.client.proxies.SmartExecutorProxy; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; import org.quartz.CronExpression; import org.slf4j.Logger; @@ -26,14 +25,6 @@ public class ISExporterPluginSmartExecutorSchedulerTest extends ScopedTest { private static Logger logger = LoggerFactory.getLogger(ISExporterPluginSmartExecutorSchedulerTest.class); - private SmartExecutorProxy proxy; - - @Before - public void before() throws Exception{ - proxy = ExecutorPlugin.getExecutorProxy(ISExporterPluginDeclaration.NAME).build(); - Assert.assertNotNull(proxy); - } - public UUID scheduleTest(Scheduling scheduling) throws Exception { Map inputs = new HashMap(); logger.debug("Inputs : {}", inputs); @@ -45,6 +36,8 @@ public class ISExporterPluginSmartExecutorSchedulerTest extends ScopedTest { } try { + SmartExecutorProxy proxy = ExecutorPlugin.getExecutorProxy(ISExporterPluginDeclaration.NAME).build(); + Assert.assertNotNull(proxy); String uuidString = proxy.launch(parameter); return UUID.fromString(uuidString); } catch(Exception e){ @@ -58,12 +51,11 @@ public class ISExporterPluginSmartExecutorSchedulerTest extends ScopedTest { public void cronExpPreviousMustBeTerminated() throws Exception { Map tokenMinutes = new HashMap<>(); - tokenMinutes.put(ScopedTest.GCUBE, "1"); - tokenMinutes.put(ScopedTest.GCUBE_DEVSEC, "20"); - tokenMinutes.put(ScopedTest.GCUBE_DEVSEC_DEVVRE, "30"); - tokenMinutes.put(ScopedTest.GCUBE_DEVNEXT, "40"); - tokenMinutes.put(ScopedTest.GCUBE_DEVNEXT_NEXTNEXT, "50"); - + tokenMinutes.put(ScopedTest.GCUBE, "0"); + tokenMinutes.put(ScopedTest.GCUBE_DEVSEC, "12"); + tokenMinutes.put(ScopedTest.GCUBE_DEVSEC_DEVVRE, "24"); + tokenMinutes.put(ScopedTest.GCUBE_DEVNEXT, "36"); + tokenMinutes.put(ScopedTest.GCUBE_DEVNEXT_NEXTNEXT, "48"); for(String token : tokenMinutes.keySet()){ logger.info("\n\n\n-------------------------------------------------------------------------"); @@ -84,6 +76,8 @@ public class ISExporterPluginSmartExecutorSchedulerTest extends ScopedTest { //@Test public void unSchedule() throws Exception { + SmartExecutorProxy proxy = ExecutorPlugin.getExecutorProxy(ISExporterPluginDeclaration.NAME).build(); + Assert.assertNotNull(proxy); proxy.unSchedule(null, true); }