You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ak...@apache.org> on 2011/06/02 19:32:03 UTC

Re: svn commit: r1129630 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java

This did not make it to the list. --Alex

On Thu, Jun 2, 2011 at 4:32 PM, Alex Karasulu <ak...@apache.org> wrote:
>
> Is there any way we can avoid using timing dependent code like these sleep calls? Can't we enable a feedback mechanism where setting some variable drives controlling this process?
> If something is not readily clear as a solution maybe we can just create a JIRA about this so we can track it and handle it later.
>
> If the machine is overloaded this will take longer and you don't know just how fast the machine will work.
> Regards,
> Alex
>
> On Tue, May 31, 2011 at 2:22 PM, <ka...@apache.org> wrote:
>>
>> Author: kayyagari
>> Date: Tue May 31 11:22:51 2011
>> New Revision: 1129630
>>
>> URL: http://svn.apache.org/viewvc?rev=1129630&view=rev
>> Log:
>> o increased the sleep time to let the consumer sync after reboot before performing any checks
>>
>> Modified:
>>    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
>>
>> Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
>> URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1129630&r1=1129629&r2=1129630&view=diff
>> ==============================================================================
>> --- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java (original)
>> +++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java Tue May 31 11:22:51 2011
>> @@ -213,7 +213,7 @@ public class ClientServerReplicationIT
>>
>>         startConsumer();
>>
>> -        Thread.sleep( 2000 );
>> +        Thread.sleep( 5000 );
>>         assertFalse( consumerSession.exists( deletedUserDn ) );
>>         waitAndCompareEntries( addedUserDn );
>>     }
>>
>>
>

Re: svn commit: r1129630 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java

Posted by Alex Karasulu <ak...@apache.org>.
On Fri, Jun 3, 2011 at 9:41 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 6/3/11 8:27 AM, Kiran Ayyagari wrote:
>>
>> On Thu, Jun 2, 2011 at 11:02 PM, Alex Karasulu<ak...@apache.org>
>>  wrote:
>>>
>>> This did not make it to the list. --Alex
>>>
>>> On Thu, Jun 2, 2011 at 4:32 PM, Alex Karasulu<ak...@apache.org>
>>>  wrote:
>>>>
>>>> Is there any way we can avoid using timing dependent code like these
>>>> sleep calls? Can't we enable a feedback mechanism where setting some
>>>> variable drives controlling this process?
>>
>> this test like many other integration tests involves a running
>> server(s) in network mode and the scenario under testing is highly
>> time bound, i.e there
>> *will* be delays before the data gets replicated and the test has to
>> be written based on the reasonable time limit.
>> Though not straight forward, feedback based mechanism can be added but
>> that requires a lot of scaffolding based on persistent search/event
>> listeners
>
> I also think that it is unfortunate, but basically replication tests are
> tome based.
>
> However, we *must* make those tests independant from the functional tests,
> otherwise we won't be able to do regression tests before committing.

Good idea. Maybe we should separate out test tests.

> OpenLDAP have a separate part where they do replication tests (the very same
> way : they are all time based).

:(

> We already shortly discussed with Kiran (well, discussing is a gross
> exgeration, we had a short IM interaction last week as a test was failing)
> and we agreed that we should define a specific profile (maven profile) to
> run replication tests.
>
> IMO, this is the only possible path...
>
> thoughts ?

+1 - I completely agree.

Regards,
Alex

Re: svn commit: r1129630 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 6/3/11 8:27 AM, Kiran Ayyagari wrote:
> On Thu, Jun 2, 2011 at 11:02 PM, Alex Karasulu<ak...@apache.org>  wrote:
>> This did not make it to the list. --Alex
>>
>> On Thu, Jun 2, 2011 at 4:32 PM, Alex Karasulu<ak...@apache.org>  wrote:
>>> Is there any way we can avoid using timing dependent code like these sleep calls? Can't we enable a feedback mechanism where setting some variable drives controlling this process?
> this test like many other integration tests involves a running
> server(s) in network mode and the scenario under testing is highly
> time bound, i.e there
> *will* be delays before the data gets replicated and the test has to
> be written based on the reasonable time limit.
> Though not straight forward, feedback based mechanism can be added but
> that requires a lot of scaffolding based on persistent search/event
> listeners
I also think that it is unfortunate, but basically replication tests are 
tome based.

However, we *must* make those tests independant from the functional 
tests, otherwise we won't be able to do regression tests before committing.

OpenLDAP have a separate part where they do replication tests (the very 
same way : they are all time based).

We already shortly discussed with Kiran (well, discussing is a gross 
exgeration, we had a short IM interaction last week as a test was 
failing) and we agreed that we should define a specific profile (maven 
profile) to run replication tests.

IMO, this is the only possible path...

thoughts ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: svn commit: r1129630 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java

Posted by Alex Karasulu <ak...@apache.org>.
On Fri, Jun 3, 2011 at 9:27 AM, Kiran Ayyagari <ka...@apache.org> wrote:
> On Thu, Jun 2, 2011 at 11:02 PM, Alex Karasulu <ak...@apache.org> wrote:
>> This did not make it to the list. --Alex
>>
>> On Thu, Jun 2, 2011 at 4:32 PM, Alex Karasulu <ak...@apache.org> wrote:
>>>
>>> Is there any way we can avoid using timing dependent code like these sleep calls? Can't we enable a feedback mechanism where setting some variable drives controlling this process?
> this test like many other integration tests involves a running
> server(s) in network mode and the scenario under testing is highly
> time bound, i.e there
> *will* be delays before the data gets replicated and the test has to
> be written based on the reasonable time limit.
> Though not straight forward, feedback based mechanism can be added but
> that requires a lot of scaffolding based on persistent search/event
> listeners

Understood. Making this feedback based is certainly non-trivial: heck
I would not want to implement it. Maybe we can just note this as an
improvement for the future.

Regards,
Alex

Re: svn commit: r1129630 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jun 2, 2011 at 11:02 PM, Alex Karasulu <ak...@apache.org> wrote:
> This did not make it to the list. --Alex
>
> On Thu, Jun 2, 2011 at 4:32 PM, Alex Karasulu <ak...@apache.org> wrote:
>>
>> Is there any way we can avoid using timing dependent code like these sleep calls? Can't we enable a feedback mechanism where setting some variable drives controlling this process?
this test like many other integration tests involves a running
server(s) in network mode and the scenario under testing is highly
time bound, i.e there
*will* be delays before the data gets replicated and the test has to
be written based on the reasonable time limit.
Though not straight forward, feedback based mechanism can be added but
that requires a lot of scaffolding based on persistent search/event
listeners
>> If something is not readily clear as a solution maybe we can just create a JIRA about this so we can track it and handle it later.
>>
>> If the machine is overloaded this will take longer and you don't know just how fast the machine will work.
>> Regards,
>> Alex
>>
>> On Tue, May 31, 2011 at 2:22 PM, <ka...@apache.org> wrote:
>>>
>>> Author: kayyagari
>>> Date: Tue May 31 11:22:51 2011
>>> New Revision: 1129630
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1129630&view=rev
>>> Log:
>>> o increased the sleep time to let the consumer sync after reboot before performing any checks
>>>
>>> Modified:
>>>    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
>>>
>>> Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
>>> URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1129630&r1=1129629&r2=1129630&view=diff
>>> ==============================================================================
>>> --- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java (original)
>>> +++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java Tue May 31 11:22:51 2011
>>> @@ -213,7 +213,7 @@ public class ClientServerReplicationIT
>>>
>>>         startConsumer();
>>>
>>> -        Thread.sleep( 2000 );
>>> +        Thread.sleep( 5000 );
>>>         assertFalse( consumerSession.exists( deletedUserDn ) );
>>>         waitAndCompareEntries( addedUserDn );
>>>     }
>>>
>>>
>>
>



-- 
Kiran Ayyagari