You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ho...@apache.org on 2006/05/24 16:52:04 UTC

svn commit: r409179 - in /geronimo/branches/1.1/modules/directory: project.properties src/test/org/apache/geronimo/directory/RunningTest.java

Author: hogstrom
Date: Wed May 24 07:52:04 2006
New Revision: 409179

URL: http://svn.apache.org/viewvc?rev=409179&view=rev
Log:
GERONIMO-2055 Externalize LDAP Initial Context factory for tests so that VM's other than the Sun JDK can be used.

We need to examine the larger issue of using multiple VMs and externalizing all properties that are sensitive to VMs.  This is a temporary fix.


Modified:
    geronimo/branches/1.1/modules/directory/project.properties
    geronimo/branches/1.1/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java

Modified: geronimo/branches/1.1/modules/directory/project.properties
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/directory/project.properties?rev=409179&r1=409178&r2=409179&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/directory/project.properties (original)
+++ geronimo/branches/1.1/modules/directory/project.properties Wed May 24 07:52:04 2006
@@ -2,7 +2,7 @@
 ## $Rev$ $Date$
 ##
 
-maven.junit.jvmargs=-Djava.endorsed.dirs=${maven.build.dir}/endorsed -ea 
+maven.junit.jvmargs=-Djava.endorsed.dirs=${maven.build.dir}/endorsed -Dinitial.context.factory=com.sun.jndi.ldap.LdapCtxFactory -ea
 maven.junit.fork=true
 
 # set eclipse project name (used in eclipse plugin V1.11 onwards)

Modified: geronimo/branches/1.1/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java?rev=409179&r1=409178&r2=409179&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java (original)
+++ geronimo/branches/1.1/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java Wed May 24 07:52:04 2006
@@ -42,8 +42,10 @@
 
         Hashtable env = new Hashtable();
         env.put(Context.PROVIDER_URL, "ldap://localhost:9389");
+        String ldapContextFactory = System.getProperty("initial.context.factory");
+        if (ldapContextFactory == null) ldapContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
         env.put(Context.INITIAL_CONTEXT_FACTORY,
-                "com.sun.jndi.ldap.LdapCtxFactory");
+                ldapContextFactory);
         //env.put( Context.SECURITY_AUTHENTICATION, "simple");
         env.put( Context.SECURITY_PRINCIPAL, PRINCIPAL);
         env.put( Context.SECURITY_CREDENTIALS, CREDENTIALS);