directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r813576 - in /directory/apacheds/branches/apacheds-schema: core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Date Thu, 10 Sep 2009 20:26:19 GMT
Author: elecharny
Date: Thu Sep 10 20:26:18 2009
New Revision: 813576

URL: http://svn.apache.org/viewvc?rev=813576&view=rev
Log:
Injected the registries into the added partitions
Fixed Configuration tests

Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=813576&r1=813575&r2=813576&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
Thu Sep 10 20:26:18 2009
@@ -20,14 +20,21 @@
 package org.apache.directory.server.core.configuration;
 
 
+import java.util.Hashtable;
+import java.util.UUID;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+
 import junit.framework.Assert;
+
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
-import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.shared.ldap.csn.CsnFactory;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -35,12 +42,6 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-import java.util.Hashtable;
-import java.util.UUID;
-
 
 /**
  * Tests dynamic partition addition and removal.
@@ -57,9 +58,10 @@
     @Test
     public void testAddAndRemove() throws Exception
     {
-        Partition partition = new JdbmPartition();
+        JdbmPartition partition = new JdbmPartition();
         partition.setId( "removable" );
         partition.setSuffix( "ou=removable" );
+        partition.setPartitionDir( service.getWorkingDirectory() );
         
         // Test AddContextPartition
         service.addPartition( partition );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=813576&r1=813575&r2=813576&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Thu Sep 10 20:26:18 2009
@@ -576,9 +576,10 @@
     }
 
 
-    public void addPartition( Partition parition ) throws Exception
+    public void addPartition( Partition partition ) throws Exception
     {
-        partitions.add( parition );
+        partition.setRegistries( getRegistries() );
+        partitions.add( partition );
 
         if ( ! started )
         {
@@ -586,7 +587,7 @@
         }
 
         AddContextPartitionOperationContext addPartitionCtx = 
-            new AddContextPartitionOperationContext( adminSession, parition );
+            new AddContextPartitionOperationContext( adminSession, partition );
         partitionNexus.addContextPartition( addPartitionCtx );
     }
 



Mime
View raw message