directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1143261 - in /directory/apacheds/trunk: ldif-partition/src/test/java/org/apache/directory/server/core/partition/ server-config/src/test/java/org/apache/directory/server/config/ xdbm-partition/src/main/java/org/apache/directory/server/xdbm/
Date Wed, 06 Jul 2011 06:22:20 GMT
Author: elecharny
Date: Wed Jul  6 06:22:19 2011
New Revision: 1143261

URL: http://svn.apache.org/viewvc?rev=1143261&view=rev
Log:
o The AbstractStoregetEntryId(DN) does not have to check if the DN is normalized.
o Made the tests passing after this modification

Modified:
    directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Modified: directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
Wed Jul  6 06:22:19 2011
@@ -244,7 +244,7 @@ public class SingleFileLdifPartitionTest
     private void assertExists( SingleFileLdifPartition partition, String dn ) throws LdapException
     {
         LookupOperationContext opCtx = new LookupOperationContext( mockSession );
-        opCtx.setDn( new Dn( dn ) );
+        opCtx.setDn( new Dn( schemaManager, dn ) );
 
         Entry fetched = partition.lookup( opCtx );
 

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ChangePasswordServerBean;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -45,6 +43,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -118,7 +119,7 @@ public class ChangePasswordConfigReaderT
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_CHANGE_PASSWORD_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_CHANGE_PASSWORD_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         ChangePasswordServerBean changePasswordServerBean = (ChangePasswordServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DhcpServerConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.DhcpServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -44,6 +42,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -111,7 +112,7 @@ public class DhcpServerConfigReaderTest
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_DHCP_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_DHCP_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         DhcpServerBean dhcpServerBean = (DhcpServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/DnsServerConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.DnsServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -44,6 +42,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -109,7 +110,7 @@ public class DnsServerConfigReaderTest
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_DNS_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_DNS_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         DnsServerBean dnsServerBean = (DnsServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/HttpServerConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.HttpServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -44,6 +42,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -109,7 +110,7 @@ public class HttpServerConfigReaderTest
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_HTTP_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_HTTP_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         HttpServerBean httpServerBean = (HttpServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/KerberosServerConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.KdcServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -44,6 +42,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -110,7 +111,7 @@ public class KerberosServerConfigReaderT
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_KERBEROS_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_KERBEROS_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         KdcServerBean kdcServerBean = (KdcServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/LdapServerConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.LdapServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -44,6 +42,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -110,7 +111,7 @@ public class LdapServerConfigReaderTest
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_LDAP_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_LDAP_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         LdapServerBean ldapServerBean = (LdapServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/NtpServerConfigReaderTest.java
Wed Jul  6 06:22:19 2011
@@ -27,8 +27,6 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.server.config.beans.ConfigBean;
 import org.apache.directory.server.config.beans.NtpServerBean;
 import org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition;
@@ -44,6 +42,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test class for ConfigPartitionReader
@@ -109,7 +110,7 @@ public class NtpServerConfigReaderTest
         configPartition.initialize();
         ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
         
-        ConfigBean configBean = cpReader.readConfig( new Dn( "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_NTP_SERVER_OC.getValue() );
+        ConfigBean configBean = cpReader.readConfig( new Dn( schemaManager, "ou=servers,ads-directoryServiceId=default,ou=config"
), ConfigSchemaConstants.ADS_NTP_SERVER_OC.getValue() );
 
         assertNotNull( configBean );
         NtpServerBean ntpServerBean = (NtpServerBean)configBean.getDirectoryServiceBeans().get(
0 );

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1143261&r1=1143260&r2=1143261&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Wed Jul  6 06:22:19 2011
@@ -765,12 +765,6 @@ public abstract class AbstractStore<E, I
             return getRootId();
         }
 
-        // Just to be sure that the Dn is normalized
-        if ( !dn.isSchemaAware() )
-        {
-            dn.apply( schemaManager );
-        }
-
         ParentIdAndRdn<ID> suffixKey = new ParentIdAndRdn<ID>( getRootId(), suffixDn.getRdns()
);
 
         // Check into the Rdn index, starting with the partition Suffix



Mime
View raw message