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"/>
</attributes>
</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>
<attribute name="maven.pomderived" value="true"/>
</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>
<artifactId>smart-executor-client</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0</version>
<description>Smart Executor Service Client Library</description>
<packaging>jar</packaging>
@ -31,7 +31,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>LATEST</version>
<version>1.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -82,13 +82,12 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.gcube.vremanagement</groupId>
<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>
</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.request.GXHTTPStringRequest;
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.exception.ExecutorException;
import org.gcube.vremanagement.executor.json.SEMapper;
@ -179,7 +178,7 @@ public class SmartExecutorClientImpl implements SmartExecutorClient {
@Override
public String getOrphanLaunches() {
return getScheduledTask(SmartExecutor.ORPHAN_PATH_PARAM);
return getScheduledTask(RestConstants.ORPHAN_PATH_PARAM);
}
@Override
@ -310,12 +309,8 @@ public class SmartExecutorClientImpl implements SmartExecutorClient {
gxHTTPStringRequest.queryParams(parameters);
HttpURLConnection httpURLConnection = gxHTTPStringRequest.delete();
String stoppedString = parseHttpURLConnection(httpURLConnection);
Boolean stopped = Boolean.valueOf(stoppedString);
logger.debug("Plugin {} with UUID {} {} stopped on host {}", pluginName, executionIdentifier,
stopped ? "successfully" : "was not", host);
return stopped;
parseHttpURLConnection(httpURLConnection);
return true;
} catch(WebApplicationException e) {
throw e;
} catch(Exception e) {

View File

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