generated from giis-uniovi/samples-giis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First commit: migrating the resource identifier with the entities + t…
…est cases
- Loading branch information
1 parent
aaeedb7
commit bf64b1f
Showing
30 changed files
with
2,387 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="optional" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
<attribute name="optional" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<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> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>retorch-orchestration</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
6 changes: 6 additions & 0 deletions
6
retorch-orchestration/.settings/org.eclipse.core.resources.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore | ||
org.eclipse.jdt.core.compiler.release=disabled | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.github.giis-uniovi</groupId> | ||
<artifactId>retorch</artifactId> | ||
<version>1.1.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>retorch-orchestration</artifactId> | ||
<packaging>jar</packaging> | ||
<name>retorch-orchestration</name> | ||
<description>Multimodule maven project template, module without dependencies</description> | ||
<url>http://github.com/giis-uniovi/samples-giis-template</url> | ||
<organization> | ||
<name>Software Engineering Research Group (GIIS) - Universidad de Oviedo, ES</name> | ||
<url>http://giis.uniovi.es/</url> | ||
</organization> | ||
<properties> | ||
<!--Separate all dependencies by a blank line to avoid problems creating combined dependencies in dependabot.--> | ||
<jacksonjson.version>2.18.1</jacksonjson.version> | ||
|
||
<mockito.version>5.14.2</mockito.version> | ||
|
||
<logback-classic.version>1.5.12</logback-classic.version> | ||
|
||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-slf4j2-impl</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
</dependency> | ||
<dependency><!-- This package allows to serialize the resources --> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>${jacksonjson.version}</version> | ||
</dependency> | ||
<dependency><!-- Mockito is used to get the logs and check that the errors appear https://mvnrepository.com/artifact/org.mockito/mockito-core --> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>${mockito.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.github.giis-uniovi</groupId> | ||
<artifactId>retorch-annotations</artifactId> | ||
<version>1.1.1-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-report-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>16</source> | ||
<target>16</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
70 changes: 70 additions & 0 deletions
70
retorch-orchestration/retorchfiles/configurations/ClassifierUnitTestsSystemResources.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"mockElasticResource": { | ||
"hierarchyParent": [], | ||
"replaceable": ["lightElasticResource","heavyInElasRest"], | ||
"elasticityModel": { | ||
"elasticityID": "elasModelmockElasticResource", | ||
"elasticity": 50, | ||
"elasticityCost": 0.0 | ||
}, | ||
"resourceType": "LOGICAL", | ||
"resourceID": "mockElasticResource", | ||
"minimalCapacities": [ | ||
{ | ||
"name": "memory", | ||
"quantity": 0.5 | ||
}, | ||
{ | ||
"name": "processor", | ||
"quantity": 2 | ||
} | ||
], | ||
"dockerImage": "someplaceholder1[IMG:]docker.someImage" | ||
}, | ||
"heavyInElasRest": { | ||
"hierarchyParent": [ | ||
"parentAllInelastic" | ||
], | ||
"replaceable": [], | ||
"elasticityModel": { | ||
"elasticityID": "elasModelHeavyInElasRest", | ||
"elasticity": 1, | ||
"elasticityCost": 50.0 | ||
}, | ||
"resourceType": "LOGICAL", | ||
"resourceID": "heavyInElasRest", | ||
"minimalCapacities": [ | ||
{ | ||
"name": "memory", | ||
"quantity": 4 | ||
}, | ||
{ | ||
"name": "processor", | ||
"quantity": 0.6 | ||
} | ||
], | ||
"dockerImage": "someplaceholder2[IMG:]docker.someImage" | ||
}, | ||
"lightElasticResource": { | ||
"hierarchyParent": [], | ||
"replaceable": [], | ||
"elasticityModel": { | ||
"elasticityID": "elasModelLightElasticResource", | ||
"elasticity": 35, | ||
"elasticityCost": 15.0 | ||
}, | ||
"resourceType": "LOGICAL", | ||
"resourceID": "lightElasticResource", | ||
"minimalCapacities": [ | ||
{ | ||
"name": "memory", | ||
"quantity": 1 | ||
}, | ||
{ | ||
"name": "processor", | ||
"quantity": 0.5 | ||
} | ||
], | ||
"dockerImage": "someplaceholder3[IMG:]docker.someImage" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
retorch-orchestration/retorchfiles/configurations/retorchCI.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
agentCIName=any | ||
sut-wait-html=<title>FullTeaching</title> | ||
sut-location=$WORKSPACE | ||
docker-frontend-name=https://full-teaching- | ||
docker-frontend-port=5000 | ||
external-binded-port= | ||
external-frontend-url= | ||
testsBasePath=somepath/somedir/ |
83 changes: 83 additions & 0 deletions
83
retorch-orchestration/src/main/java/giis/retorch/orchestration/model/AccessModeEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package giis.retorch.orchestration.model; | ||
|
||
/** | ||
* RETORCH access mode that represents how a test case uses a resource | ||
*/ | ||
public class AccessModeEntity { | ||
|
||
private AccessModeTypesEntity accessMode; | ||
private boolean sharing = false; | ||
private int concurrency = 1; | ||
private ResourceEntity resource; | ||
|
||
public AccessModeEntity() { | ||
} | ||
/** | ||
* RETORCH access mode copy constructor | ||
*/ | ||
public AccessModeEntity(AccessModeEntity accessMode) { | ||
this.accessMode = accessMode.getAccessMode(); | ||
this.concurrency = accessMode.getConcurrency(); | ||
this.resource = accessMode.getResource(); | ||
this.sharing = accessMode.getSharing(); | ||
} | ||
|
||
public AccessModeTypesEntity getAccessMode() { | ||
return accessMode; | ||
} | ||
public int getConcurrency() { | ||
return concurrency; | ||
} | ||
public ResourceEntity getResource() { | ||
return resource; | ||
} | ||
public boolean getSharing() { | ||
return sharing; | ||
} | ||
public void setSharing(boolean sharing) { | ||
this.sharing = sharing; | ||
} | ||
public void setResource(ResourceEntity resource) { | ||
this.resource = resource; | ||
} | ||
public void setConcurrency(int concurrency) { | ||
this.concurrency = concurrency; | ||
} | ||
public void setAccessMode(AccessModeTypesEntity accessMode) { | ||
this.accessMode = accessMode; | ||
} | ||
|
||
/** | ||
* Access mode constructor | ||
* @param accessMode {@link AccessModeTypesEntity} that could be READONLY,WRITEONLY,READWRITE,DYNAMIC or NOACCESS | ||
* @param sharing Boolean that represents if the resource can be shared or not | ||
* @param concurrency Integer with the max number of concurrent access | ||
* @param resource Resource on which the access mode is performed | ||
*/ | ||
public AccessModeEntity(AccessModeTypesEntity accessMode, boolean sharing, int concurrency, ResourceEntity resource) { | ||
this.accessMode = accessMode; | ||
this.sharing = sharing; | ||
this.concurrency = concurrency; | ||
this.resource = resource; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return super.hashCode(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null) return false; | ||
if (!obj.getClass().equals(this.getClass())) return false; | ||
AccessModeEntity objToCompare = ((AccessModeEntity) obj); | ||
|
||
return objToCompare.getSharing() == this.sharing && objToCompare.getConcurrency() == this.concurrency | ||
&& objToCompare.getAccessMode().equals(this.accessMode) && objToCompare.getResource().equals(this.resource); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "a.m.{" + accessMode + ", " + sharing + ", " + concurrency + ",'" + resource + '\'' + '}'; | ||
} | ||
} |
Oops, something went wrong.