directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1059096 - in /directory/apacheds/branches/apacheds-AP: core-constants/ core-integ/src/test/java/org/apache/directory/server/core/collective/ core-integ/src/test/java/org/apache/directory/server/core/subtree/ core-jndi/ http-directory-bridg...
Date Fri, 14 Jan 2011 18:21:39 GMT
Author: elecharny
Date: Fri Jan 14 18:21:38 2011
New Revision: 1059096

URL: http://svn.apache.org/viewvc?rev=1059096&view=rev
Log:
Merged back the trunk into my branch

Modified:
    directory/apacheds/branches/apacheds-AP/core-constants/   (props changed)
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/AbstractSubentryUnitTest.java
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
    directory/apacheds/branches/apacheds-AP/core-jndi/   (props changed)
    directory/apacheds/branches/apacheds-AP/http-directory-bridge/   (props changed)
    directory/apacheds/branches/apacheds-AP/http-integration/   (props changed)
    directory/apacheds/branches/apacheds-AP/i18n/   (props changed)

Propchange: directory/apacheds/branches/apacheds-AP/core-constants/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:21:38 2011
@@ -2,3 +2,4 @@
 /directory/apacheds/branches/apacheds-config/core-constants:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-constants:980138-980934
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-constants:1040956-1043765
+/directory/apacheds/trunk/core-constants:1049007-1059082

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java?rev=1059096&r1=1059095&r2=1059096&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
Fri Jan 14 18:21:38 2011
@@ -34,6 +34,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.Entry;
@@ -52,6 +53,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -70,7 +73,11 @@ public class CollectiveAttributeServiceI
 
     private Entry getTestEntry( String dn, String cn ) throws LdapLdifException, LdapException
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass:
person", "cn", cn,
+        Entry subentry = LdifUtils.createEntry( 
+            new DN( dn ), 
+            "objectClass: top", 
+            "objectClass: person", 
+            "cn", cn,
             "sn: testentry" );
 
         return subentry;
@@ -79,9 +86,14 @@ public class CollectiveAttributeServiceI
 
     private Entry getTestSubentry( String dn ) throws LdapLdifException, LdapException
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass:
subentry",
-            "objectClass: collectiveAttributeSubentry", "c-ou: configuration",
-            "subtreeSpecification: { base \"ou=configuration\" }", "cn: testsubentry" );
+        Entry subentry = LdifUtils.createEntry( 
+            new DN( dn ), 
+            "objectClass: top", 
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry", 
+            "c-ou: configuration",
+            "subtreeSpecification: { base \"ou=configuration\" }", 
+            "cn: testsubentry" );
 
         return subentry;
     }
@@ -89,9 +101,14 @@ public class CollectiveAttributeServiceI
 
     private Entry getTestSubentry2( String dn ) throws LdapLdifException, LdapException
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass:
subentry",
-            "objectClass: collectiveAttributeSubentry", "c-ou: configuration2",
-            "subtreeSpecification: { base \"ou=configuration\" }", "cn: testsubentry2" );
+        Entry subentry = LdifUtils.createEntry( 
+            new DN( dn ), 
+            "objectClass: top", 
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry", 
+            "c-ou: configuration2",
+            "subtreeSpecification: { base \"ou=configuration\" }", 
+            "cn: testsubentry2" );
 
         return subentry;
     }
@@ -99,9 +116,14 @@ public class CollectiveAttributeServiceI
 
     private Entry getTestSubentry3( String dn ) throws LdapLdifException, LdapException
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass:
subentry",
-            "objectClass: collectiveAttributeSubentry", "c-st: FL",
-            "subtreeSpecification: { base \"ou=configuration\" }", "cn: testsubentry3" );
+        Entry subentry = LdifUtils.createEntry( 
+            new DN( dn ), 
+            "objectClass: top", 
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry", 
+            "c-st: FL",
+            "subtreeSpecification: { base \"ou=configuration\" }", 
+            "cn: testsubentry3" );
 
         return subentry;
     }
@@ -179,22 +201,44 @@ public class CollectiveAttributeServiceI
         return resultMap;
     }
 
+    @BeforeClass
+    public static void init()
+    {
+        //System.out.println( "==============================================================="
);
+    }
 
     @Before
-    public void init() throws Exception
+    public void setup() throws Exception
     {
+        //System.out.println( "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
);
         connection = IntegrationUtils.getAdminConnection( service );
     }
 
 
+    private void dumpBase() throws Exception
+    {
+        SearchCursor cursor = connection.search( "ou=system" , "(ObjectClass=*)", SearchScope.SUBTREE,
"*", "+" );
+        
+        while ( cursor.next() )
+        {
+            Response entry = cursor.get();
+            
+            System.out.println( LdifUtils.convertEntryToLdif( ((SearchResultEntry)entry).getEntry()
) );
+        }
+    }
+    
+    
     @After
     public void shutdown() throws Exception
     {
+        //System.out.println( "----------------------------------------------------------------"
);
+        //dumpBase();
         connection.close();
     }
 
 
     @Test
+    //@Ignore
     public void testLookup() throws Exception
     {
         // -------------------------------------------------------------------
@@ -478,6 +522,7 @@ public class CollectiveAttributeServiceI
 
 
     @Test
+    @Ignore
     public void testAddRegularEntryWithCollectiveAttribute() throws Exception
     {
         Entry entry = getTestEntry( "cn=Ersin Er,ou=system", "Ersin Er" );
@@ -490,6 +535,7 @@ public class CollectiveAttributeServiceI
 
 
     @Test
+    @Ignore
     public void testModifyRegularEntryAddingCollectiveAttribute() throws Exception
     {
         Entry entry = getTestEntry( "cn=Ersin Er,ou=system", "Ersin Er" );

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/AbstractSubentryUnitTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/AbstractSubentryUnitTest.java?rev=1059096&r1=1059095&r2=1059096&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/AbstractSubentryUnitTest.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/AbstractSubentryUnitTest.java
Fri Jan 14 18:21:38 2011
@@ -30,9 +30,11 @@ import java.util.Set;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.apache.directory.server.constants.ApacheSchemaConstants;
+import org.apache.directory.server.core.administrative.AdministrativePoint;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControl;
+import org.apache.directory.shared.ldap.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
@@ -40,10 +42,13 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.message.AddResponse;
+import org.apache.directory.shared.ldap.message.Response;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.util.tree.DnNode;
 import org.junit.After;
 import org.junit.Before;
 
@@ -533,4 +538,111 @@ public class AbstractSubentryUnitTest ex
         
         return Long.parseLong( attribute.getString() );
     }
+    
+    
+    protected void dumpBase( String base ) throws Exception
+    {
+        SearchRequest request = new SearchRequestImpl();
+        request.setBase( service.getDNFactory().create( base ) );
+        request.setFilter( "(ObjectClass=*)" );
+        request.setScope( SearchScope.SUBTREE );
+        request.addAttributes( "*", 
+            "CollectiveAttributeSubentriesUUID", "AccessControlSubentriesUUID", "SubSchemaSubentriesUuid",
"TriggerExecutionSubentriesUUID",
+            "AccessControlSeqNumber", "CollectiveAttributeSeqNumber", "TriggerExecutionSeqNumber",
"SubSchemaSeqNumber", 
+            "entryUUID" );
+        
+        SearchCursor cursor = adminConnection.search( request );
+        
+        System.out.println( "--- Dump base ----------------------------------------");
+        
+        while ( cursor.next() )
+        {
+            Response entry = cursor.get();
+            
+            System.out.println( LdifUtils.convertEntryToLdif( ((SearchResultEntry)entry).getEntry()
) );
+        }
+
+        System.out.println( "+++ Dump base ++++++++++++++++++++++++++++++++++++++++");
+    }
+    
+    
+    protected void dumpSubentries( String base ) throws Exception
+    {
+        SearchRequest request = new SearchRequestImpl();
+        request.setBase( service.getDNFactory().create( base ) );
+        request.setFilter( "(ObjectClass=*)" );
+        request.setScope( SearchScope.SUBTREE );
+        request.addAttributes( "*", 
+            "CollectiveAttributeSubentriesUUID", "AccessControlSubentriesUUID", "SubSchemaSubentriesUuid",
"TriggerExecutionSubentriesUUID",
+            "AccessControlSeqNumber", "CollectiveAttributeSeqNumber", "TriggerExecutionSeqNumber",
"SubSchemaSeqNumber", 
+            "entryUUID", "subtreeSpecification" );
+        SubentriesControl subentriesControl = new SubentriesControl();
+        subentriesControl.setCritical( true );
+        subentriesControl.setVisibility( true );
+        
+        request.addControl( subentriesControl );
+        
+        SearchCursor cursor = adminConnection.search( request );
+        
+        System.out.println( "--- Dump subentries ----------------------------------");
+        
+        while ( cursor.next() )
+        {
+            Response entry = cursor.get();
+            
+            System.out.println( LdifUtils.convertEntryToLdif( ((SearchResultEntry)entry).getEntry()
) );
+        }
+
+        System.out.println( "+++ Dump subentries ++++++++++++++++++++++++++++++++++");
+    }
+    
+    
+    protected void dumpApCache()
+    {
+        DnNode<AdministrativePoint> apAcCache = service.getAccessControlAPCache();
+
+        if ( !apAcCache.isLeaf() || ( apAcCache.getElement() != null ) )
+        {
+            System.out.println( "--- Dump AC AP cache ---------------------------------");
+            
+            System.out.println( apAcCache );
+        }
+        
+        DnNode<AdministrativePoint> apCaCache = service.getCollectiveAttributeAPCache();
+
+        if ( !apCaCache.isLeaf() || ( apCaCache.getElement() != null ) )
+        {
+            System.out.println( "--- Dump CA AP cache ---------------------------------");
+            
+            System.out.println( apCaCache );
+        }
+
+        DnNode<AdministrativePoint> apSsCache = service.getSubschemaAPCache();
+
+        if ( !apSsCache.isLeaf() || ( apSsCache.getElement() != null ) )
+        {
+            System.out.println( "--- Dump SS AP cache ---------------------------------");
+        
+            System.out.println( apSsCache );
+        }
+
+        DnNode<AdministrativePoint> apTeCache = service.getTriggerExecutionAPCache();
+
+        if ( !apTeCache.isLeaf() || ( apTeCache.getElement() != null ) )
+        {
+            System.out.println( "--- Dump TE AP cache ---------------------------------");
+        
+            System.out.println( apTeCache );
+        }
+
+        System.out.println( "+++ Dump APs cache +++++++++++++++++++++++++++++++++++");
+    }
+
+    
+    protected void dumpSubentryCache()
+    {
+        System.out.println( "--- Dump Subentry cache -----------------------------");
+        System.out.println( service.getSubentryCache() );
+        System.out.println( "+++ Dump Subentry cache ++++++++++++++++++++++++++++++");
+    }
 }

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=1059096&r1=1059095&r2=1059096&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
Fri Jan 14 18:21:38 2011
@@ -193,9 +193,14 @@ public class SubentryServiceIT extends A
 
     public Entry getSubentry( String dn ) throws Exception
     {
-        Entry subentry = LdifUtils.createEntry( new DN( dn ), "objectClass: top", "objectClass:
subentry",
-            "objectClass: collectiveAttributeSubentry", "subtreeSpecification: { base \"ou=configuration\"
}",
-            "c-o: Test Org", "cn: testsubentry" );
+        Entry subentry = LdifUtils.createEntry( 
+            new DN( dn ), 
+            "objectClass: top", 
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry", 
+            "subtreeSpecification: { base \"ou=configuration\" }",
+            "c-o: Test Org", 
+            "cn: testsubentry" );
 
         return subentry;
     }

Propchange: directory/apacheds/branches/apacheds-AP/core-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:21:38 2011
@@ -2,3 +2,4 @@
 /directory/apacheds/branches/apacheds-config/core-jndi:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-jndi:980138-980935
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-jndi:1040956-1043765
+/directory/apacheds/trunk/core-jndi:1049007-1059082

Propchange: directory/apacheds/branches/apacheds-AP/http-directory-bridge/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Jan 14 18:21:38 2011
@@ -0,0 +1,8 @@
+/directory/apacheds/branches/apacheds-codec-merge/http-directory-bridge:982369-987590
+/directory/apacheds/branches/apacheds-config/http-directory-bridge:1023442-1029077
+/directory/apacheds/branches/apacheds-kerberos-codec-2.0/http-directory-bridge:1040956-1043765
+/directory/apacheds/branches/apacheds-replication/http-directory-bridge:749790-764110
+/directory/apacheds/branches/apacheds-schema/http-directory-bridge:806623-896441
+/directory/apacheds/branches/apacheds-subtree/http-directory-bridge:965203-965686
+/directory/apacheds/branches/xdbm-refactoring/http-directory-bridge:945827-946347
+/directory/apacheds/trunk/http-directory-bridge:1049007-1059082

Propchange: directory/apacheds/branches/apacheds-AP/http-integration/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:21:38 2011
@@ -2,3 +2,4 @@
 /directory/apacheds/branches/apacheds-config/http-integration:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/http-integration:980138-980935
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/http-integration:1040956-1043765
+/directory/apacheds/trunk/http-integration:1049007-1059082

Propchange: directory/apacheds/branches/apacheds-AP/i18n/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:21:38 2011
@@ -2,3 +2,4 @@
 /directory/apacheds/branches/apacheds-config/i18n:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/i18n:980138-980935
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/i18n:1040956-1043765
+/directory/apacheds/trunk/i18n:1049007-1059082



Mime
View raw message