Version 2.0.0

This commit is contained in:
Luca Frosini 2019-12-04 09:57:49 +01:00
parent 53a26cefb1
commit 06eaafe6c5
6 changed files with 22 additions and 15 deletions

View File

@ -22,7 +22,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>

View File

@ -0,0 +1,6 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.vremanagement</groupId> <groupId>org.gcube.vremanagement</groupId>
<artifactId>smart-executor-client</artifactId> <artifactId>smart-executor-client</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.0.0</version>
<description>Smart Executor Service Client Library</description> <description>Smart Executor Service Client Library</description>
<packaging>jar</packaging> <packaging>jar</packaging>
@ -31,7 +31,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId> <artifactId>gcube-bom</artifactId>
<version>LATEST</version> <version>1.4.0</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -82,13 +82,12 @@
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>1.0.13</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.vremanagement</groupId> <groupId>org.gcube.vremanagement</groupId>
<artifactId>hello-world-se-plugin</artifactId> <artifactId>hello-world-se-plugin</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> <version>[1.0.0, 2.0.0-SNAPSHOT)</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>

View File

@ -18,7 +18,6 @@ import org.gcube.common.gxhttp.reference.GXConnection;
import org.gcube.common.gxhttp.reference.GXConnection.HTTPMETHOD; import org.gcube.common.gxhttp.reference.GXConnection.HTTPMETHOD;
import org.gcube.common.gxhttp.request.GXHTTPStringRequest; import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
import org.gcube.vremanagement.executor.api.rest.RestConstants; import org.gcube.vremanagement.executor.api.rest.RestConstants;
import org.gcube.vremanagement.executor.api.rest.SmartExecutor;
import org.gcube.vremanagement.executor.api.types.LaunchParameter; import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.exception.ExecutorException; import org.gcube.vremanagement.executor.exception.ExecutorException;
import org.gcube.vremanagement.executor.json.SEMapper; import org.gcube.vremanagement.executor.json.SEMapper;
@ -179,7 +178,7 @@ public class SmartExecutorClientImpl implements SmartExecutorClient {
@Override @Override
public String getOrphanLaunches() { public String getOrphanLaunches() {
return getScheduledTask(SmartExecutor.ORPHAN_PATH_PARAM); return getScheduledTask(RestConstants.ORPHAN_PATH_PARAM);
} }
@Override @Override
@ -310,12 +309,8 @@ public class SmartExecutorClientImpl implements SmartExecutorClient {
gxHTTPStringRequest.queryParams(parameters); gxHTTPStringRequest.queryParams(parameters);
HttpURLConnection httpURLConnection = gxHTTPStringRequest.delete(); HttpURLConnection httpURLConnection = gxHTTPStringRequest.delete();
String stoppedString = parseHttpURLConnection(httpURLConnection); parseHttpURLConnection(httpURLConnection);
Boolean stopped = Boolean.valueOf(stoppedString); return true;
logger.debug("Plugin {} with UUID {} {} stopped on host {}", pluginName, executionIdentifier,
stopped ? "successfully" : "was not", host);
return stopped;
} catch(WebApplicationException e) { } catch(WebApplicationException e) {
throw e; throw e;
} catch(Exception e) { } catch(Exception e) {

View File

@ -57,8 +57,10 @@ public class SmartExecutorClientTest extends ContextTest {
return launchParameter; return launchParameter;
} }
// @Test @Test
public void testServiceInteraction() throws IOException { public void testServiceInteraction() throws Exception {
SmartExecutorClientFactory.forceURL("http://pc-frosini.isti.cnr.it:8080/smart-executor");
HelloWorldPluginDeclaration helloWorldPluginDeclaration = new HelloWorldPluginDeclaration(); HelloWorldPluginDeclaration helloWorldPluginDeclaration = new HelloWorldPluginDeclaration();
logger.debug("Going to test smart executor using {} plugin", helloWorldPluginDeclaration.getName()); logger.debug("Going to test smart executor using {} plugin", helloWorldPluginDeclaration.getName());
SmartExecutorClient smartExecutorClient = SmartExecutorClientFactory SmartExecutorClient smartExecutorClient = SmartExecutorClientFactory