directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1053795 - in /directory/apacheds/branches/apacheds-AP: core-integ/src/test/java/org/apache/directory/server/core/subtree/ core/src/main/java/org/apache/directory/server/core/
Date Thu, 30 Dec 2010 04:08:31 GMT
Author: elecharny
Date: Thu Dec 30 04:08:31 2010
New Revision: 1053795

URL: http://svn.apache.org/viewvc?rev=1053795&view=rev
Log:
o Changed the logic in the DS APSeqNuber generation : we increment it first, then we return
the new value
o Fixd the tests acordingly

Modified:
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryDeleteOperationIT.java
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryLookupOperationIT.java
    directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java?rev=1053795&r1=1053794&r2=1053795&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
Thu Dec 30 04:08:31 2010
@@ -287,7 +287,7 @@ public class SubentryAddOperationIT exte
 
         Entry ap = adminConnection.lookup( "ou=SAP,ou=system", "+", "*" );
         assertNotNull( ap );
-        assertEquals( "0", ap.get( "CollectiveAttributeSeqNumber" ).getString() );
+        assertEquals( "1", ap.get( "CollectiveAttributeSeqNumber" ).getString() );
         
         // Now, try to inject an AP under the subentry
         // First add an AAP

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryDeleteOperationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryDeleteOperationIT.java?rev=1053795&r1=1053794&r2=1053795&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryDeleteOperationIT.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryDeleteOperationIT.java
Thu Dec 30 04:08:31 2010
@@ -95,7 +95,7 @@ public class SubentryDeleteOperationIT e
 
         Entry ap = adminConnection.lookup( "ou=AAP,ou=system", "+", "*" );
         assertNotNull( ap );
-        assertEquals( "0", ap.get( "collectiveAttributeSeqNumber" ).getString() );
+        assertEquals( "1", ap.get( "collectiveAttributeSeqNumber" ).getString() );
         
         // Now try to delete the AP
         DeleteResponse delResponse = adminConnection.delete( "ou=AAP,ou=system" );

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryLookupOperationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryLookupOperationIT.java?rev=1053795&r1=1053794&r2=1053795&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryLookupOperationIT.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryLookupOperationIT.java
Thu Dec 30 04:08:31 2010
@@ -143,7 +143,7 @@ public class SubentryLookupOperationIT e
         long teSN = Long.parseLong( aap.get( "TriggerExecutionSeqNumber" ).getString() );
         
         assertEquals( -1L, acSN );
-        assertNotSame( -1L, caSN );
+        assertEquals( service.getApSeqNumber(), caSN );
         assertEquals( -1L, ssSN );
         assertEquals( -1L, teSN );
         
@@ -154,16 +154,6 @@ public class SubentryLookupOperationIT e
         assertNull( subentry.get( "SubSchemaSeqNumber" ) );
         assertNull( subentry.get( "TriggerExecutionSeqNumber" ) );
     }
-
-
-    /**
-     * Test the lookup of a subentry with the subentries control.
-     */
-    @Test
-    public void testLookupSubentryWithControl() throws Exception
-    {
-        // TODO
-    }
     
     
     // ===================================================================

Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1053795&r1=1053794&r2=1053795&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Thu Dec 30 04:08:31 2010
@@ -1975,7 +1975,7 @@ public class DefaultDirectoryService imp
      */
     public long getNewApSeqNumber()
     {
-        return apSeqNumber.getAndIncrement();
+        return apSeqNumber.incrementAndGet();
     }
 
 



Mime
View raw message