[ 
https://issues.apache.org/jira/browse/DIRSERVER-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny updated DIRSERVER-2094:
-----------------------------------------
    Component/s: test
                 code quality

> Cleanup code duplication in tests
> ---------------------------------
>
>                 Key: DIRSERVER-2094
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2094
>             Project: Directory ApacheDS
>          Issue Type: Task
>          Components: code quality, test
>            Reporter: Stefan Seelmann
>            Priority: Major
>
> In tests there is endless duplication of setting up a JNDI LDAP connection, 
> for example:
> {code}
>         Hashtable<String, String> env = new Hashtable<String, String>();
>         env.put( Context.INITIAL_CONTEXT_FACTORY, 
> "com.sun.jndi.ldap.LdapCtxFactory" );
>         env.put( Context.PROVIDER_URL, "ldap://"; + 
> InetAddress.getLocalHost().getHostName() + ":"
>             + getLdapServer().getPort() );
>         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
>         env.put( Context.SECURITY_PRINCIPAL, 
> "uid=hnelson,ou=users,dc=example,dc=com" );
>         env.put( Context.SECURITY_CREDENTIALS, "secret" );
>         env.put( "java.naming.ldap.attributes.binary", "krb5key" );
> {code}
> That should (TM) be clean up.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to