This commit is contained in:
Lucio Lelii 2018-06-14 09:29:15 +00:00
parent add37f7a1d
commit c6676795ce
4 changed files with 11 additions and 10 deletions

View File

@ -134,7 +134,7 @@
<groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId>
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
</dependency>
</dependency>
<dependency>
<groupId>xerces</groupId>

View File

@ -49,6 +49,7 @@ public class ConfigurationManager {
options.load(is);
is.close();
maxComputations = Integer.parseInt(options.getProperty("maxcomputations"));
logger.info("setting max computation to {}",maxComputations);
useStorage = Boolean.parseBoolean(options.getProperty("saveond4sstorage"));
simulationMode=Boolean.parseBoolean(options.getProperty("simulationMode"));
}

View File

@ -1,3 +1,3 @@
maxcomputations=4
maxcomputations=1
saveond4sstorage=true
simulationMode=false

View File

@ -17,22 +17,22 @@ import org.junit.Test;
public class AlgorithmTest {
List<String> executeOnly = Arrays.asList();
List<String> executeOnly = Arrays.asList("#BIONYM", "#AQUAMAPS_SUITABLE", "#AQUAMAPS_SUITABLE 21 sp", "#BIONYM1024","#CMSY2");
@Test
public void executeAlgorithmsFromFile() throws Exception{
String env = "dev";
Properties prop = new Properties();
/*Properties prop = new Properties();
prop.load(AlgorithmTest.class.getResourceAsStream("/test_params.properties"));
*/
String protocol = "http";
String hostname = prop.getProperty(env+".host");
String token = prop.getProperty(env+".token");
String layerID = prop.getProperty(env+".layer");
String hostname = "dataminer-genericworkers.d4science.org";
String token = "257800d8-24bf-4bae-83cd-ea99369e7dd6-843339462";
String layerID = "08ee0d70-4d8b-4f42-8b06-d709482bca95";
Iterator<String> uris = getUrisIterator();
HttpClient client = new HttpClient();
@ -43,7 +43,7 @@ public class AlgorithmTest {
if (nextLine.startsWith("#"))
algorithmName = nextLine;
else{
if (!(executeOnly.isEmpty() || executeOnly.contains(algorithmName))) continue;
if (executeOnly.contains(algorithmName)) continue;
String callUrl = nextLine.replace("{PROTOCOL}", protocol).replace("{HOST}", hostname).replace("{TOKEN}", token).replace("{LAYERID}", layerID);
try{
long start = System.currentTimeMillis();