Updated Test

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/data-miner-manager-cl@133845 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-11-03 10:59:56 +00:00
parent ea2f561001
commit 241a92a74a
24 changed files with 135 additions and 261 deletions

View File

@ -26,6 +26,7 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

View File

@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@ -15,9 +20,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>

View File

@ -1,5 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="data-miner-manager-cl">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.7"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>

View File

@ -3,10 +3,7 @@ package org.gcube.data.analysis.dataminermanagercl.server;
import static org.gcube.common.authorization.client.Constants.authorizationService;
import org.gcube.common.authorization.library.AuthorizationEntry;
import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.ClientInfo;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.authorization.library.provider.UserInfo;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient4WPSBuilder;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClientBuilder;
@ -25,8 +22,9 @@ import org.slf4j.LoggerFactory;
*/
public class DataMinerService {
private static Logger logger = LoggerFactory
.getLogger(DataMinerService.class);
// private HashMap<String, SClient> cachedSClients;
private Logger logger = LoggerFactory.getLogger(DataMinerService.class);
/**
*
@ -36,22 +34,35 @@ public class DataMinerService {
* @return
* @throws Exception
*/
public static SClient getClient()
throws Exception {
public DataMinerService() {
// cachedSClients= new HashMap<>();
}
public SClient getClient() throws Exception {
ServiceCredential serviceCredential = getServiceCredential();
/*
* if (cachedSClients.isEmpty() ||
* !cachedSClients.containsKey(serviceCredential.getScope())) {
*/
SClientBuilder sBuilder = new SClient4WPSBuilder(serviceCredential);
SClientDirector director = new SClientDirector();
director.setSClientBuilder(sBuilder);
director.constructSClient();
SClient sClient = director.getSClient();
logger.debug("" + sClient);
// cachedSClients.put(serviceCredential.getScope(), sClient);
return sClient;
/*
* } else { return cachedSClients.get(serviceCredential.getScope()); }
*/
}
private static ServiceCredential getServiceCredential()
throws ServiceException {
private ServiceCredential getServiceCredential() throws ServiceException {
String userName = null;
String token = null;
String scope = null;
@ -66,11 +77,13 @@ public class DataMinerService {
try {
logger.debug("Retrieving token credentials");
// get username from SmartGears
ClientInfo tokenInfo = (UserInfo) AuthorizationProvider.instance
.get().getClient();
userName = tokenInfo.getId();
// ClientInfo tokenInfo = (UserInfo)
// AuthorizationProvider.instance
// .get().getClient();
// userName = tokenInfo.getId();
token = SecurityTokenProvider.instance.get();
AuthorizationEntry entry = authorizationService().get(token);
userName = entry.getClientInfo().getId();
scope = entry.getContext();
} catch (Exception e) {
logger.error("Error Retrieving token credentials: "

View File

@ -3,8 +3,6 @@
*/
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
/**
*
* @author Giancarlo Panichi email: <a
@ -15,8 +13,6 @@ public class ColumnListParameter extends Parameter {
private static final long serialVersionUID = -6743494426144267089L;
private String referredTabularParameterName;
// private List<String> columnNames = new ArrayList<String>();
private String value;
private String separator;
public ColumnListParameter() {
@ -47,18 +43,6 @@ public class ColumnListParameter extends Parameter {
return referredTabularParameterName;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
/**
* @return the separator
*/

View File

@ -3,7 +3,6 @@
*/
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
/**
*
* @author Giancarlo Panichi email: <a
@ -18,7 +17,6 @@ public class ColumnParameter extends Parameter {
private static final long serialVersionUID = -5084557326770554659L;
private String referredTabularParameterName;
private String defaultColumn;
private String value;
/**
*
@ -69,18 +67,6 @@ public class ColumnParameter extends Parameter {
this.defaultColumn = defaultColumn;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "ColumnParameter [referredTabularParameterName="

View File

@ -3,7 +3,6 @@
*/
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
/**
*
* @author Giancarlo Panichi email: <a
@ -14,7 +13,6 @@ public class DateParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private String defaultValue;
private String value;
/**
*
@ -49,19 +47,6 @@ public class DateParameter extends Parameter {
this.defaultValue = defaultValue;
}
/**
* @return the value
*/
@Override
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "DateParameter [defaultValue=" + defaultValue + ", value="

View File

@ -8,8 +8,8 @@ import java.util.List;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class EnumParameter extends Parameter {
@ -17,8 +17,6 @@ public class EnumParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private List<String> values = new ArrayList<String>();
private String defaultValue;
private String value;
/**
*
@ -27,66 +25,52 @@ public class EnumParameter extends Parameter {
super();
this.typology = ParameterType.ENUM;
}
/**
* @param type
* @param defaultValue
* @param value
*/
public EnumParameter(String name, String description, List<String> values, String defaultValue) {
public EnumParameter(String name, String description, List<String> values,
String defaultValue) {
super(name, ParameterType.ENUM, description);
this.values = values;
this.defaultValue = defaultValue;
}
/**
* @return the defaultValue
*/
public String getDefaultValue() {
return defaultValue;
}
/**
* @param defaultValue the defaultValue to set
* @param defaultValue
* the defaultValue to set
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
/**
* @param values the values to set
* @param values
* the values to set
*/
public void setValues(List<String> values) {
this.values = values;
}
/**
* @return the values
*/
public List<String> getValues() {
return values;
}
public void addValue(String value) {
this.values.add(value);
}
/**
* @return the value
*/
@Override
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
@ -95,8 +79,5 @@ public class EnumParameter extends Parameter {
+ ", description=" + description + ", typology=" + typology
+ "]";
}
}

View File

@ -5,19 +5,18 @@ package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
import java.util.ArrayList;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class FileParameter extends Parameter {
private static final long serialVersionUID = -2967577990287112937L;
private String value;
private String defaultMimeType;
private ArrayList<String> supportedMimeTypes;
/**
*
*/
@ -25,7 +24,7 @@ public class FileParameter extends Parameter {
super();
this.typology = ParameterType.FILE;
}
/**
*
* @param name
@ -33,7 +32,8 @@ public class FileParameter extends Parameter {
* @param fileName
* @param mimeType
*/
public FileParameter(String name, String description, String defaultMimeType, ArrayList<String> supportedMimeTypes) {
public FileParameter(String name, String description,
String defaultMimeType, ArrayList<String> supportedMimeTypes) {
super(name, ParameterType.FILE, description);
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
@ -55,23 +55,6 @@ public class FileParameter extends Parameter {
this.supportedMimeTypes = supportedMimeTypes;
}
/**
*
*/
public String getValue() {
return value;
}
/**
*
*/
@Override
public void setValue(String value) {
this.value=value;
}
@Override
public String toString() {
return "FileParameter [value=" + value + ", defaultMimeType="
@ -80,7 +63,4 @@ public class FileParameter extends Parameter {
+ description + ", typology=" + typology + "]";
}
}

View File

@ -14,7 +14,6 @@ public class ListParameter extends Parameter {
private static final long serialVersionUID = 5405965026753332225L;
private String type;
private String value;
private String separator;
/**
@ -51,15 +50,6 @@ public class ListParameter extends Parameter {
this.type = type;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String getValue() {
return value;
}
/**
* @return the separator

View File

@ -1,21 +1,17 @@
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ObjectParameter extends Parameter {
private static final long serialVersionUID = 1058462575242430851L;
private String type;
private String defaultValue;
private String value;
/**
*
*/
@ -23,55 +19,50 @@ public class ObjectParameter extends Parameter {
super();
this.typology = ParameterType.OBJECT;
}
public ObjectParameter(String name, String description, String type, String defaultValue) {
/**
*
* @param name
* @param description
* @param type
* @param defaultValue
*/
public ObjectParameter(String name, String description, String type,
String defaultValue) {
super(name, ParameterType.OBJECT, description);
this.type = type;
this.defaultValue = defaultValue;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
* @param type
* the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the defaultValue
*/
public String getDefaultValue() {
return defaultValue;
}
/**
* @param defaultValue the defaultValue to set
* @param defaultValue
* the defaultValue to set
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
@ -81,10 +72,4 @@ public class ObjectParameter extends Parameter {
+ "]";
}
}

View File

@ -21,6 +21,7 @@ public abstract class Parameter implements Serializable {
protected String name;
protected String description;
protected ParameterType typology;
protected String value;
/**
*
@ -29,6 +30,7 @@ public abstract class Parameter implements Serializable {
super();
}
/**
* @param name
* @param type
@ -43,9 +45,13 @@ public abstract class Parameter implements Serializable {
this.description = description;
}
public abstract void setValue(String value);
public void setValue(String value){
this.value=value;
}
public abstract String getValue();
public String getValue(){
return value;
}
public String getName() {
return name;
@ -88,7 +94,9 @@ public abstract class Parameter implements Serializable {
@Override
public String toString() {
return "Parameter [name=" + name + ", description=" + description
+ ", typology=" + typology + "]";
+ ", typology=" + typology + ", value=" + value + "]";
}
}

View File

@ -7,14 +7,13 @@ import java.util.ArrayList;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabularListParameter extends Parameter {
private static final long serialVersionUID = -1786477950530892502L;
private String value;
private String separator;
private ArrayList<String> templates = new ArrayList<String>();
private String defaultMimeType;
@ -40,16 +39,6 @@ public class TabularListParameter extends Parameter {
this.supportedMimeTypes = supportedMimeTypes;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String getValue() {
return value;
}
/**
* @return the separator
*/
@ -105,6 +94,4 @@ public class TabularListParameter extends Parameter {
+ description + ", typology=" + typology + "]";
}
}

View File

@ -14,7 +14,6 @@ import java.util.ArrayList;
public class TabularParameter extends Parameter {
private static final long serialVersionUID = 8038591467145151553L;
private String tableName;
private ArrayList<String> templates = new ArrayList<String>();
private String defaultMimeType;
private ArrayList<String> supportedMimeTypes;
@ -36,7 +35,7 @@ public class TabularParameter extends Parameter {
public TabularParameter(String name, String description, String tableName,
String defaultMimeType, ArrayList<String> supportedMimeTypes) {
super(name, ParameterType.TABULAR, description);
this.tableName = tableName;
this.value = tableName;
this.templates = null;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
@ -53,18 +52,18 @@ public class TabularParameter extends Parameter {
ArrayList<String> templates, String defaultMimeType,
ArrayList<String> supportedMimeTypes) {
super(name, ParameterType.TABULAR, description);
this.tableName = tableName;
this.value = tableName;
this.templates = templates;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
}
public String getTableName() {
return tableName;
return value;
}
public void setTableName(String tableName) {
this.tableName = tableName;
this.value = tableName;
}
public ArrayList<String> getTemplates() {
@ -75,16 +74,6 @@ public class TabularParameter extends Parameter {
this.templates = templates;
}
@Override
public String getValue() {
return getTableName();
}
@Override
public void setValue(String value) {
this.setTableName(value);
}
public String getDefaultMimeType() {
return defaultMimeType;
}
@ -103,7 +92,7 @@ public class TabularParameter extends Parameter {
@Override
public String toString() {
return "TabularParameter [tableName=" + tableName + ", templates="
return "TabularParameter [tableName=" + value + ", templates="
+ templates + ", defaultMimeType=" + defaultMimeType
+ ", supportedMimeTypes=" + supportedMimeTypes + ", name="
+ name + ", description=" + description + ", typology="

View File

@ -13,7 +13,6 @@ public class TimeParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private String defaultValue;
private String value;
/**
*
@ -48,19 +47,6 @@ public class TimeParameter extends Parameter {
this.defaultValue = defaultValue;
}
/**
* @return the value
*/
@Override
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "TimeParameter [defaultValue=" + defaultValue + ", value="

View File

@ -15,7 +15,6 @@ public class WKTParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private WKTGeometryType wktGeometryType;
private String defaultValue;
private String value;
/**
*
@ -69,19 +68,6 @@ public class WKTParameter extends Parameter {
this.wktGeometryType = wktGeometryType;
}
/**
* @return the value
*/
@Override
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "WKTParameter [wktGeometryType=" + wktGeometryType

View File

@ -1,7 +1,6 @@
package org.gcube.data.analysis.dataminermanagercl.test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import junit.framework.TestCase;
@ -37,7 +36,8 @@ public class DBScanTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test Dbscan");
try {
SClient sClient = DataMinerService.getClient();
DataMinerService dataMinerService = new DataMinerService();
SClient sClient = dataMinerService.getClient();
Operator dBScanOperator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN");
@ -90,8 +90,7 @@ public class DBScanTest extends TestCase {
@Override
public void failed(String message, Exception exception) {
logger.error("Operation Failed");
logger.error(message);
logger.error(exception.getStackTrace().toString());
logger.error(message, exception);
}
@ -126,11 +125,12 @@ public class DBScanTest extends TestCase {
OutputData output = sClient
.getOutputDataByComputationId(computationId);
logger.debug("Output: " + output);
Resource resource=output.getResource();
if(resource.isMap()){
MapResource mapResource=(MapResource) resource;
for(String key: mapResource.getMap().keySet()){
logger.debug("Entry: "+key+" = "+mapResource.getMap().get(key));
Resource resource = output.getResource();
if (resource.isMap()) {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = "
+ mapResource.getMap().get(key));
}
}
@ -158,32 +158,21 @@ public class DBScanTest extends TestCase {
occurencePointsTable.setName("OccurrencePointsTable");
occurencePointsTable
.setValue("http://data-d.d4science.org/SnBPSHJQOEI4UHQ0QkhnM2p3L2JGQytNTmtSb1FpUTFHbWJQNStIS0N6Yz0");
occurencePointsTable.setDefaultMimeType("text/csv");
ArrayList<String> supportedMimeTypes = new ArrayList<>(
Arrays.asList(new String[] { "text/xml", "text/csv",
"text/plain" }));
occurencePointsTable.setSupportedMimeTypes(supportedMimeTypes);
ColumnListParameter columnListParameter = new ColumnListParameter();
columnListParameter.setName("FeaturesColumnNames");
columnListParameter
.setReferredTabularParameterName("OccurrencePointsTable");
columnListParameter.setSeparator("|");
columnListParameter.setValue("depthmean|sstmnmax|salinitymin");
ObjectParameter occurencePointsClusterLabel = new ObjectParameter();
occurencePointsClusterLabel.setName("OccurrencePointsClusterLabel");
occurencePointsClusterLabel.setType("java.lang.String");
occurencePointsClusterLabel.setValue("Test");
ObjectParameter epsilon = new ObjectParameter();
epsilon.setName("epsilon");
epsilon.setType("java.lang.Integer");
epsilon.setValue("10");
ObjectParameter minPoints = new ObjectParameter();
minPoints.setName("min_points");
minPoints.setType("java.lang.Integer");
minPoints.setValue("1");
List<Parameter> parameters = new ArrayList<>();

View File

@ -28,7 +28,7 @@ public class DataMinerServiceTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test Operators");
try {
SClient sClient = DataMinerService.getClient();
SClient sClient = new DataMinerService().getClient();
List<OperatorsClassification> operatorsClassifications = sClient
.getOperatorsClassifications();
logger.debug("OperatorsClassifications: " + operatorsClassifications);
@ -69,7 +69,8 @@ public class DataMinerServiceTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test DBScan");
try {
SClient sClient = DataMinerService.getClient();
DataMinerService dataMinerService=new DataMinerService();
SClient sClient = dataMinerService.getClient();
List<OperatorsClassification> operatorsClassifications = sClient
.getOperatorsClassifications();
logger.debug("OperatorsClassifications rerieved");

View File

@ -34,7 +34,8 @@ public class ListDBInfoTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListDBInfo");
try {
SClient sClient = DataMinerService.getClient();
DataMinerService dataMinerService=new DataMinerService();
SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBINFO");
@ -147,15 +148,13 @@ public class ListDBInfoTest extends TestCase {
*/
private void createRequest(Operator operator) {
logger.debug("Create Request");
ObjectParameter resourceName = new ObjectParameter();
resourceName.setName("ResourceName");
resourceName.setType("java.lang.String");
//MaxNumber.setValue("CKanDatabase");
resourceName.setValue("FishBase");
List<Parameter> parameters = new ArrayList<>();
//MaxNumber.setValue("CKanDatabase");
List<Parameter> parameters = new ArrayList<>();
parameters.add(resourceName);
logger.debug("Parameters set: " + parameters);

View File

@ -34,7 +34,8 @@ public class ListDBNameTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListDBName");
try {
SClient sClient = DataMinerService.getClient();
DataMinerService dataMinerService=new DataMinerService();
SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBNAMES");
@ -150,7 +151,6 @@ public class ListDBNameTest extends TestCase {
ObjectParameter maxNumber = new ObjectParameter();
maxNumber.setName("MaxNumber");
maxNumber.setType("java.lang.String");
maxNumber.setValue("-1");
List<Parameter> parameters = new ArrayList<>();

View File

@ -35,7 +35,8 @@ public class ListDBSchemaTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListDBSchema");
try {
SClient sClient = DataMinerService.getClient();
DataMinerService dataMinerService=new DataMinerService();
SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBSCHEMA");
@ -162,12 +163,10 @@ public class ListDBSchemaTest extends TestCase {
ObjectParameter resourceName = new ObjectParameter();
resourceName.setName("ResourceName");
resourceName.setType("java.lang.String");
resourceName.setValue("FishBase");
ObjectParameter databaseName = new ObjectParameter();
databaseName.setName("DatabaseName");
databaseName.setType("java.lang.String");
databaseName.setValue("fishbase");
List<Parameter> parameters = new ArrayList<>();

View File

@ -35,7 +35,8 @@ public class ListTablesTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListTables");
try {
SClient sClient = DataMinerService.getClient();
DataMinerService dataMinerService=new DataMinerService();
SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTTABLES");
@ -162,17 +163,14 @@ public class ListTablesTest extends TestCase {
ObjectParameter resourceName = new ObjectParameter();
resourceName.setName("ResourceName");
resourceName.setType("java.lang.String");
resourceName.setValue("FishBase");
ObjectParameter databaseName = new ObjectParameter();
databaseName.setName("DatabaseName");
databaseName.setType("java.lang.String");
databaseName.setValue("fishbase");
ObjectParameter schemaName = new ObjectParameter();
schemaName.setName("SchemaName");
schemaName.setType("java.lang.String");
schemaName.setValue("public");
List<Parameter> parameters = new ArrayList<>();