git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@169188 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
add37f7a1d
commit
c6676795ce
2
pom.xml
2
pom.xml
|
@ -134,7 +134,7 @@
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>home-library</artifactId>
|
<artifactId>home-library</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>xerces</groupId>
|
<groupId>xerces</groupId>
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class ConfigurationManager {
|
||||||
options.load(is);
|
options.load(is);
|
||||||
is.close();
|
is.close();
|
||||||
maxComputations = Integer.parseInt(options.getProperty("maxcomputations"));
|
maxComputations = Integer.parseInt(options.getProperty("maxcomputations"));
|
||||||
|
logger.info("setting max computation to {}",maxComputations);
|
||||||
useStorage = Boolean.parseBoolean(options.getProperty("saveond4sstorage"));
|
useStorage = Boolean.parseBoolean(options.getProperty("saveond4sstorage"));
|
||||||
simulationMode=Boolean.parseBoolean(options.getProperty("simulationMode"));
|
simulationMode=Boolean.parseBoolean(options.getProperty("simulationMode"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
maxcomputations=4
|
maxcomputations=1
|
||||||
saveond4sstorage=true
|
saveond4sstorage=true
|
||||||
simulationMode=false
|
simulationMode=false
|
|
@ -17,22 +17,22 @@ import org.junit.Test;
|
||||||
|
|
||||||
public class AlgorithmTest {
|
public class AlgorithmTest {
|
||||||
|
|
||||||
List<String> executeOnly = Arrays.asList();
|
List<String> executeOnly = Arrays.asList("#BIONYM", "#AQUAMAPS_SUITABLE", "#AQUAMAPS_SUITABLE 21 sp", "#BIONYM1024","#CMSY2");
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void executeAlgorithmsFromFile() throws Exception{
|
public void executeAlgorithmsFromFile() throws Exception{
|
||||||
|
|
||||||
String env = "dev";
|
String env = "dev";
|
||||||
|
|
||||||
Properties prop = new Properties();
|
/*Properties prop = new Properties();
|
||||||
prop.load(AlgorithmTest.class.getResourceAsStream("/test_params.properties"));
|
prop.load(AlgorithmTest.class.getResourceAsStream("/test_params.properties"));
|
||||||
|
*/
|
||||||
|
|
||||||
String protocol = "http";
|
String protocol = "http";
|
||||||
String hostname = prop.getProperty(env+".host");
|
String hostname = "dataminer-genericworkers.d4science.org";
|
||||||
String token = prop.getProperty(env+".token");
|
String token = "257800d8-24bf-4bae-83cd-ea99369e7dd6-843339462";
|
||||||
String layerID = prop.getProperty(env+".layer");
|
String layerID = "08ee0d70-4d8b-4f42-8b06-d709482bca95";
|
||||||
|
|
||||||
Iterator<String> uris = getUrisIterator();
|
Iterator<String> uris = getUrisIterator();
|
||||||
|
|
||||||
HttpClient client = new HttpClient();
|
HttpClient client = new HttpClient();
|
||||||
|
@ -43,7 +43,7 @@ public class AlgorithmTest {
|
||||||
if (nextLine.startsWith("#"))
|
if (nextLine.startsWith("#"))
|
||||||
algorithmName = nextLine;
|
algorithmName = nextLine;
|
||||||
else{
|
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);
|
String callUrl = nextLine.replace("{PROTOCOL}", protocol).replace("{HOST}", hostname).replace("{TOKEN}", token).replace("{LAYERID}", layerID);
|
||||||
try{
|
try{
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
Loading…
Reference in New Issue