Removed circular dependecy

feature/22924 r5.4.0
Luca Frosini 3 years ago
parent 9b7bf6445b
commit 47c4fca044

@ -83,12 +83,12 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.gcube.vremanagement</groupId>
<artifactId>hello-world-se-plugin</artifactId>
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
<scope>test</scope>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.gcube.vremanagement</groupId> -->
<!-- <artifactId>hello-world-se-plugin</artifactId> -->
<!-- <version>[2.0.0, 3.0.0-SNAPSHOT)</version> -->
<!-- <scope>test</scope> -->
<!-- </dependency> -->
</dependencies>
</project>

@ -10,11 +10,9 @@ import java.util.concurrent.TimeUnit;
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.api.types.Scheduling;
import org.gcube.vremanagement.executor.client.query.Discover;
import org.gcube.vremanagement.executor.plugin.Plugin;
import org.gcube.vremanagement.executor.plugin.PluginDefinition;
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
import org.gcube.vremanagement.helloworld.HelloWorldPlugin;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
@ -31,6 +29,11 @@ public class SmartExecutorClientTest extends ContextTest {
public static final String HTTPS_ADDRESS = "https://smartexecutor.d4science.org:8090/smart-executor/rest";
public static final String HOST = "smartexecutor.d4science.org";
public static final String SLEEP_TIME = "sleepTime";
public static final String HELLO_WORLD_PLUGIN_NAME = "hello-world-se-plugin";
public static final String HELLO_WORLD_PLUGIN_VERSION = "2.0.0";
public static final String HELLO_WORLD_PLUGIN_DESCRIPTION = "Hello World Smart Executor Plugin";
@Test
public void testSetAddress() {
SmartExecutorClientImpl smartExecutorClient = new SmartExecutorClientImpl();
@ -48,10 +51,10 @@ public class SmartExecutorClientTest extends ContextTest {
private LaunchParameter getLaunchParameter() {
Scheduling scheduling = new Scheduling(20);
Map<String,Object> inputs = new HashMap<String,Object>();
inputs.put(HelloWorldPlugin.SLEEP_TIME, TimeUnit.SECONDS.toMillis(10));
inputs.put(SLEEP_TIME, TimeUnit.SECONDS.toMillis(10));
inputs.put("TestUUID", UUID.randomUUID());
LaunchParameter launchParameter = new LaunchParameter(new HelloWorldPlugin().getName(), inputs);
LaunchParameter launchParameter = new LaunchParameter(HELLO_WORLD_PLUGIN_NAME, inputs);
launchParameter.setScheduling(scheduling);
return launchParameter;
@ -61,8 +64,7 @@ public class SmartExecutorClientTest extends ContextTest {
public void testServiceInteraction() throws Exception {
SmartExecutorClientFactory.forceURL("http://pc-frosini.isti.cnr.it:8080/smart-executor");
Plugin plugin = new HelloWorldPlugin();
String pluginName = plugin.getName();
String pluginName = HELLO_WORLD_PLUGIN_NAME;
logger.debug("Going to test smart executor using {} plugin", pluginName);
SmartExecutorClient smartExecutorClient = SmartExecutorClientFactory.getClient(pluginName);
@ -74,9 +76,9 @@ public class SmartExecutorClientTest extends ContextTest {
PluginDefinition pluginDefinition = plugins.get(0);
Assert.assertTrue(pluginDefinition.getName().compareTo(pluginName) == 0);
Assert.assertTrue(pluginDefinition.getDescription().compareTo(plugin.getDescription()) == 0);
Assert.assertTrue(pluginDefinition.getVersion().compareTo(plugin.getVersion()) == 0);
Assert.assertTrue(pluginDefinition.getSupportedCapabilities().equals(plugin.getSupportedCapabilities()));
Assert.assertTrue(pluginDefinition.getDescription().compareTo(HELLO_WORLD_PLUGIN_DESCRIPTION) == 0);
Assert.assertTrue(pluginDefinition.getVersion().compareTo(HELLO_WORLD_PLUGIN_VERSION) == 0);
//Assert.assertTrue(pluginDefinition.getSupportedCapabilities().equals(plugin.getSupportedCapabilities()));
List<ScheduledTask> orphans = smartExecutorClient.getOrphanScheduledLaunches();
for(ScheduledTask orphan : orphans) {

Loading…
Cancel
Save