directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-1810) Test case org.apache.directory.server.replication.ClientServerReplicationIT.testModDn() fails permanently
Date Mon, 06 May 2013 17:40:16 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649902#comment-13649902
] 

Emmanuel Lecharny commented on DIRSERVER-1810:
----------------------------------------------

I'm tracking this issue which is really annoying.

What I see when I run the test is that we first inject an entry (user1) in the provider, and
then we check that the entry is present in the consumer, which is not the case in the loop
where we do a lookup. 

I printed the Add requests being done on both the consumer and producer servers :

Adding dc=example,dc=com, ldapserver : provider-replication
Adding ou=consumers,ou=system, ldapserver : provider-replication
Adding dc=example,dc=com, ldapserver : consumer-replication
Adding ads-replConsumerId=localhost,ou=system, ldapserver : consumer-replication
Adding cn=user1,dc=example,dc=com, ldapserver : provider-replication
Adding ads-dsReplicaId=1,ou=consumers,ou=system, ldapserver : provider-replication


It seems that the consumer is not added at the right moment  into the list of consumer on
the provider, thus the consumer is never informed of the modification.

OTOH, if I add a delay *before* the addition of the entry, then everything works fine :

Adding dc=example,dc=com, ldapserver : provider-replication
Adding ou=consumers,ou=system, ldapserver : provider-replication
Adding dc=example,dc=com, ldapserver : consumer-replication
Adding ads-replConsumerId=localhost,ou=system, ldapserver : consumer-replication
Adding cn=user1,dc=example,dc=com, ldapserver : provider-replication
Adding cn=user1,dc=example,dc=com, ldapserver : consumer-replication
Adding ads-dsReplicaId=1,ou=consumers,ou=system, ldapserver : provider-replication
...

It seems that the initialization is not completed when we inject the first entry that has
to be replicated, which is annoying. The delay I added is at least 500ms, less makes the test
to fail.

We should be sure that the replication subsystem is ready to at least log the modifications
*before* we accept any modification on the producer...
                
> Test case org.apache.directory.server.replication.ClientServerReplicationIT.testModDn()
fails permanently
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1810
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1810
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Pierre-Arnaud Marcelot
>            Priority: Blocker
>             Fix For: 2.0.0-RC1
>
>
> Test case org.apache.directory.server.replication.ClientServerReplicationIT.testModDn()
fails permanently on my machine via Maven *and* in Eclipse.
> I ignored it until we find a fix.
> Here's the error:
> java.lang.AssertionError
> 	at org.junit.Assert.fail(Assert.java:86)
> 	at org.junit.Assert.assertTrue(Assert.java:41)
> 	at org.junit.Assert.assertTrue(Assert.java:52)
> 	at org.apache.directory.server.replication.ClientServerReplicationIT.testModDn(ClientServerReplicationIT.java:290)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.apache.directory.junit.tools.MultiThreadedMultiInvoker$1$1.run(MultiThreadedMultiInvoker.java:160)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> 	at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message