diff --git a/pom.xml b/pom.xml
index 2844557..71d35bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
org.gcube.vremanagement
smart-executor-api
- [1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)
+ [1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)
@@ -77,7 +77,7 @@
org.gcube.vremanagement
smart-executor-client
- [1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)
+ [1.3.0-SNAPSHOT, 2.0.0-SNAPSHOT)
test
diff --git a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java
index 90d384b..c7bde97 100644
--- a/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java
+++ b/src/test/java/org/gcube/informationsystem/sweeper/ISSweeperPluginTest.java
@@ -21,7 +21,7 @@ public class ISSweeperPluginTest {
@Before
public void beforeTest(){
- SecurityTokenProvider.instance.set("59074832-f986-46ce-9e46-5f2211300f9c");
+ SecurityTokenProvider.instance.set("TOKEN-HERE");
}
@Test
diff --git a/src/test/java/org/gcube/informationsystem/sweeper/SmartExecutorSchedulerTest.java b/src/test/java/org/gcube/informationsystem/sweeper/SmartExecutorSchedulerTest.java
index 9367ac5..360837d 100644
--- a/src/test/java/org/gcube/informationsystem/sweeper/SmartExecutorSchedulerTest.java
+++ b/src/test/java/org/gcube/informationsystem/sweeper/SmartExecutorSchedulerTest.java
@@ -7,6 +7,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
+import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.api.types.Scheduling;
@@ -33,9 +34,10 @@ public class SmartExecutorSchedulerTest {
private SmartExecutorProxy proxy;
- //@Before
+ @Before
public void before() throws Exception{
- ScopeProvider.instance.set(SCOPE);
+ SecurityTokenProvider.instance.set("TOKEN-HERE");
+ ScopeProvider.instance.set("/gcube/devsec");
proxy = ExecutorPlugin.getExecutorProxy(ISSweeperPluginDeclaration.NAME).build();
Assert.assertNotNull(proxy);
}
@@ -47,11 +49,17 @@ public class SmartExecutorSchedulerTest {
LaunchParameter parameter = new LaunchParameter(ISSweeperPluginDeclaration.NAME, inputs);
parameter.setScheduling(scheduling);
- String uuidString = proxy.launch(parameter);
- return UUID.fromString(uuidString);
+ try {
+ String uuidString = proxy.launch(parameter);
+ return UUID.fromString(uuidString);
+ } catch(Exception e){
+ logger.error("Error laucnhing sheduled task", e);
+ throw e;
+ }
+
}
- //@Test
+ @Test
public void cronExpPreviousMustBeTerminated() throws Exception {
CronExpression cronExpression = new CronExpression("0 */10 * * * ?"); // every 10 minutes starting from now
Scheduling scheduling = new Scheduling(cronExpression, true);