You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/06/06 18:26:06 UTC
svn commit: r1346969 - in /directory/apacheds/branches/apacheds-txns-merge:
ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/
server-integ/src/test/java/org/apache/directory/server/replication/
Author: elecharny
Date: Wed Jun 6 16:26:06 2012
New Revision: 1346969
URL: http://svn.apache.org/viewvc?rev=1346969&view=rev
Log:
Applied rev 1301058
Modified:
directory/apacheds/branches/apacheds-txns-merge/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
directory/apacheds/branches/apacheds-txns-merge/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
Modified: directory/apacheds/branches/apacheds-txns-merge/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns-merge/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java?rev=1346969&r1=1346968&r2=1346969&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns-merge/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java (original)
+++ directory/apacheds/branches/apacheds-txns-merge/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java Wed Jun 6 16:26:06 2012
@@ -213,7 +213,7 @@ public class SingleFileLdifPartitionTest
* @param fileName the full path to the ldif file to be loaded
* @param truncate the flag to determine to truncate the file or not
* @return the ldif partition after loading all the data
- * @throws Exception
+ * @throws Exception
*/
private SingleFileLdifPartition createPartition( String fileName, boolean truncate ) throws Exception
{
@@ -248,6 +248,7 @@ public class SingleFileLdifPartitionTest
private void assertExists( SingleFileLdifPartition partition, Entry entry ) throws LdapException
{
LookupOperationContext opCtx = new LookupOperationContext( mockSession );
+ opCtx.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
opCtx.setDn( entry.getDn() );
Entry fetched = executionManager.lookup( partition, opCtx );
@@ -429,7 +430,7 @@ public class SingleFileLdifPartitionTest
executionManager.add( partition, addCtx );
- // now perform a modification on the entry present in middle of LDIF file
+ // now perform a modification on the entry present in middle of LDIF file
modOpCtx = new ModifyOperationContext( mockSession );
modOpCtx.setEntry( new ClonedServerEntry( schemaManager, entry1 ) );
modOpCtx.setDn( entry1.getDn() );
@@ -909,7 +910,7 @@ public class SingleFileLdifPartitionTest
/**
* An important test to check the stability of the partition
- * under high concurrency
+ * under high concurrency
*
* @throws Exception
*/
Modified: directory/apacheds/branches/apacheds-txns-merge/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns-merge/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1346969&r1=1346968&r2=1346969&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns-merge/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java (original)
+++ directory/apacheds/branches/apacheds-txns-merge/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java Wed Jun 6 16:26:06 2012
@@ -46,6 +46,7 @@ import org.apache.directory.server.ldap.
import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl;
import org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler;
+import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.message.ModifyRequest;
@@ -83,7 +84,7 @@ public class ClientServerReplicationIT
@BeforeClass
public static void setUp() throws Exception
{
- Class<?> justLoadToSetControlProperties = Class.forName( FrameworkRunner.class.getName() );
+ Class.forName( FrameworkRunner.class.getName() );
startProvider();
startConsumer();
}
@@ -164,7 +165,7 @@ public class ClientServerReplicationIT
if ( session.exists( entryDn ) )
{
if ( print )
- {
+ {
System.out.println( entryDn.getName() + " exists " );
}
@@ -241,6 +242,7 @@ public class ClientServerReplicationIT
@Test
+ @Ignore("There might be a bug where the old RDN value is still present in the provider session.")
public void testModDn() throws Exception
{
Entry provUser = createEntry();
@@ -446,10 +448,15 @@ public class ClientServerReplicationIT
private void waitAndCompareEntries( Dn dn ) throws Exception
{
- // sleep for 2 sec (twice the refresh interval), just to let the first refresh request succeed
- Entry providerEntry = providerSession.lookup( dn, "*", "+" );
+ String[] searchAttributes = new String[]
+ {
+ SchemaConstants.ALL_USER_ATTRIBUTES,
+ SchemaConstants.ENTRY_UUID_AT
+ };
+
+ Entry providerEntry = providerSession.lookup( dn, searchAttributes );
+ Entry consumerEntry = consumerSession.lookup( dn, searchAttributes );
- Entry consumerEntry = consumerSession.lookup( dn, "*", "+" );
assertEquals( providerEntry, consumerEntry );
}
@@ -470,8 +477,8 @@ public class ClientServerReplicationIT
@CreateDS(
- allowAnonAccess = true,
- name = "provider-replication",
+ allowAnonAccess = true,
+ name = "provider-replication",
enableChangeLog = false,
partitions =
{
@@ -484,7 +491,7 @@ public class ClientServerReplicationIT
@CreateIndex(attribute = "dc"),
@CreateIndex(attribute = "ou")
},
- contextEntry=@ContextEntry( entryLdif =
+ contextEntry=@ContextEntry( entryLdif =
"dn: dc=example,dc=com\n" +
"objectClass: domain\n" +
"dc: example" ) )
@@ -524,9 +531,9 @@ public class ClientServerReplicationIT
@CreateDS(
- allowAnonAccess = true,
+ allowAnonAccess = true,
enableChangeLog = false,
- name = "consumer-replication",
+ name = "consumer-replication",
partitions =
{
@CreatePartition(
@@ -538,7 +545,7 @@ public class ClientServerReplicationIT
@CreateIndex(attribute = "dc"),
@CreateIndex(attribute = "ou")
},
- contextEntry=@ContextEntry( entryLdif =
+ contextEntry=@ContextEntry( entryLdif =
"dn: dc=example,dc=com\n" +
"objectClass: domain\n" +
"dc: example" ) )