refs #89: Save Task Evolution on NoSQL global DB
https://support.d4science.org/issues/89 Fixing tests git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@117714 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
422dcdb031
commit
5d9fbf652c
|
@ -18,7 +18,6 @@ import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceConn
|
||||||
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceConnectorTest;
|
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceConnectorTest;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginState;
|
import org.gcube.vremanagement.executor.plugin.PluginState;
|
||||||
import org.gcube.vremanagement.executor.scheduler.SmartExecutorScheduler;
|
import org.gcube.vremanagement.executor.scheduler.SmartExecutorScheduler;
|
||||||
import org.h2.jdbc.JdbcSQLException;
|
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
@ -147,7 +146,7 @@ public class SmartExecutorSchedulerTest {
|
||||||
PluginState pluginStateFromDeprecation = pc.getPluginInstanceState(uuid, 5);
|
PluginState pluginStateFromDeprecation = pc.getPluginInstanceState(uuid, 5);
|
||||||
Assert.assertEquals(PluginState.STOPPED, pluginStateFromDeprecation);
|
Assert.assertEquals(PluginState.STOPPED, pluginStateFromDeprecation);
|
||||||
|
|
||||||
}catch(JdbcSQLException e){
|
}catch(PluginStateNotRetrievedException e){
|
||||||
// OK
|
// OK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +316,7 @@ public class SmartExecutorSchedulerTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected=JdbcSQLException.class)
|
@Test(expected=PluginStateNotRetrievedException.class)
|
||||||
public void delayedExpMaxtimes() throws Exception {
|
public void delayedExpMaxtimes() throws Exception {
|
||||||
Scheduling scheduling = new Scheduling(20, 3);
|
Scheduling scheduling = new Scheduling(20, 3);
|
||||||
UUID uuid = scheduleTest(scheduling, new Long(10 * 1000));
|
UUID uuid = scheduleTest(scheduling, new Long(10 * 1000));
|
||||||
|
@ -395,7 +394,7 @@ public class SmartExecutorSchedulerTest {
|
||||||
try{
|
try{
|
||||||
PluginState pluginState = pc.getPluginInstanceState(HelloWorldPluginDeclaration.NAME, uuid, 5);
|
PluginState pluginState = pc.getPluginInstanceState(HelloWorldPluginDeclaration.NAME, uuid, 5);
|
||||||
Assert.assertEquals(PluginState.STOPPED, pluginState);
|
Assert.assertEquals(PluginState.STOPPED, pluginState);
|
||||||
}catch(JdbcSQLException e){
|
}catch(PluginStateNotRetrievedException e){
|
||||||
// OK
|
// OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -432,7 +431,7 @@ public class SmartExecutorSchedulerTest {
|
||||||
try{
|
try{
|
||||||
PluginState pluginState = pc.getPluginInstanceState(HelloWorldPluginDeclaration.NAME, uuid, 5);
|
PluginState pluginState = pc.getPluginInstanceState(HelloWorldPluginDeclaration.NAME, uuid, 5);
|
||||||
Assert.assertEquals(PluginState.STOPPED, pluginState);
|
Assert.assertEquals(PluginState.STOPPED, pluginState);
|
||||||
}catch(JdbcSQLException e){
|
}catch(PluginStateNotRetrievedException e){
|
||||||
// OK
|
// OK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,7 +473,7 @@ public class SmartExecutorSchedulerTest {
|
||||||
try{
|
try{
|
||||||
PluginState pluginState = pc.getPluginInstanceState(HelloWorldPluginDeclaration.NAME, uuid, 5);
|
PluginState pluginState = pc.getPluginInstanceState(HelloWorldPluginDeclaration.NAME, uuid, 5);
|
||||||
Assert.assertEquals(PluginState.DISCARDED, pluginState);
|
Assert.assertEquals(PluginState.DISCARDED, pluginState);
|
||||||
}catch(JdbcSQLException e){
|
}catch(PluginStateNotRetrievedException e){
|
||||||
// OK
|
// OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue