mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.1-MNT1 (5.1.0) to HEAD (5.1)
115466 adavis: Merged 5.1.N (5.1.1) to 5.1-MNT1 (5.1.0) 114587 amorarasu: Merged 5.0.N (5.0.3) to 5.1.N (5.1.1) 114483 amorarasu: Merged V4.2-BUG-FIX (4.2.6) to 5.0.N (5.0.3) 114306 amorarasu: Merged V4.2.5 (4.2.5) to V4.2-BUG-FIX (4.2.6) 114282 adragoi: Merged DEV to V4.2.5 (4.2.5) 114252: MNT-14432 : DB TestPublicAp*TCK failures on DB2, MariaDB, Oracle & SQL Server - configured cmis tck timeout in tests property file git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@115675 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,10 +23,12 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.chemistry.opencmis.commons.SessionParameter;
|
||||
import org.apache.chemistry.opencmis.commons.enums.BindingType;
|
||||
import org.apache.chemistry.opencmis.tck.impl.JUnitHelper;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Encapsulates Chemistry OpenCMIS client connection details and creates a parameters file for running the
|
||||
@@ -39,7 +41,7 @@ public class OpenCMISClientContext
|
||||
{
|
||||
private Map<String, String> cmisParameters;
|
||||
|
||||
public OpenCMISClientContext(BindingType bindingType, String url, String username, String password, Map<String, String> parameters) throws IOException
|
||||
public OpenCMISClientContext(BindingType bindingType, String url, String username, String password, Map<String, String> parameters, ApplicationContext ctx) throws IOException
|
||||
{
|
||||
cmisParameters = new HashMap<String, String>();
|
||||
cmisParameters.putAll(parameters);
|
||||
@@ -54,8 +56,20 @@ public class OpenCMISClientContext
|
||||
}
|
||||
cmisParameters.put(SessionParameter.USER, username);
|
||||
cmisParameters.put(SessionParameter.PASSWORD, password);
|
||||
|
||||
if (ctx != null)
|
||||
{
|
||||
Properties properties = (Properties)ctx.getBean("global-properties");
|
||||
cmisParameters.put(SessionParameter.CONNECT_TIMEOUT, properties.getProperty("opencmis.tck.connecttimeout"));
|
||||
cmisParameters.put(SessionParameter.READ_TIMEOUT, properties.getProperty("opencmis.tck.readtimeout"));
|
||||
}
|
||||
createCMISParametersFile();
|
||||
}
|
||||
|
||||
public OpenCMISClientContext(BindingType bindingType, String url, String username, String password, Map<String, String> parameters) throws IOException
|
||||
{
|
||||
this(bindingType, url, username, password, parameters, null);
|
||||
}
|
||||
|
||||
protected void createCMISParametersFile() throws IOException
|
||||
{
|
||||
|
Reference in New Issue
Block a user