You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Tobias Bocanegra <tr...@apache.org> on 2014/03/14 01:44:35 UTC

[ApacheDS] Best way of using ApacheDS in unit tests?

Hi,

I need to use an LDAP server in one of my unit tests [0]. currently
I'm extending from AbstractServerTest [1] but this looks a bit weird.
Is there a nicer way of doing it? I don't think I can use the
annotation based framework-runner, since I have to extend from my own
base classes.

Thanks.
Regards, Toby

[0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginTestBase.java
[1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/InternalLdapServer.java

Re: Cache size definition and how to scope initial size.

Posted by Kiran Ayyagari <ka...@apache.org>.
On Fri, Mar 14, 2014 at 1:24 PM, Mark D <te...@debusschere.com> wrote:

> Trying to understand the meaning and how to set
>
> ads-partitionCacheSize
> ads-indexcachesize
>
> From the configuration page.
>
> 1. the cache size used for this partition (it's the number of page that
> will be kept in memory, considering that a page may contain more than one
> entry)
> 2. Number of cached entries
> 3. Number of key we cache
>
> It's not clear if the partition cache is a page size or an object
> (regardless of size)
>
> in partition cache it is for the number of LDAP entries, in index cache it
is for the number of internal tuples
(which contain <entryUUID,attribute-value> and/or <attribute-value, list of
entryUUIDs>)

> Do these settings represent the initial size that is immediately allocated
> or grows dynamically and what happens once the number is reached?
>
> this cache grows dynamically, and objects are evicted based on the LRU
policy

> Is there anyway to see what is in use while an instance is running,
> logging ?
>
> no

> Thanks,
>
>
>
>


-- 
Kiran Ayyagari
http://keydap.com

Cache size definition and how to scope initial size.

Posted by Mark D <te...@debusschere.com>.
Trying to understand the meaning and how to set

ads-partitionCacheSize
ads-indexcachesize

>From the configuration page.

1. the cache size used for this partition (it's the number of page that will be kept in memory, considering that a page may contain more than one entry)
2. Number of cached entries
3. Number of key we cache

It's not clear if the partition cache is a page size or an object (regardless of size)

Do these settings represent the initial size that is immediately allocated or grows dynamically and what happens once the number is reached?

Is there anyway to see what is in use while an instance is running, logging ?

Thanks,




Re: [ApacheDS] Best way of using ApacheDS in unit tests?

Posted by Kiran Ayyagari <ka...@apache.org>.
On Fri, Mar 14, 2014 at 6:14 AM, Tobias Bocanegra <tr...@apache.org> wrote:

> Hi,
>
> I need to use an LDAP server in one of my unit tests [0]. currently
> I'm extending from AbstractServerTest [1] but this looks a bit weird.
> Is there a nicer way of doing it? I don't think I can use the
>
no, no other way, test class should use the @FrameworkRunner and extend
from AbstractServerTest

> annotation based framework-runner, since I have to extend from my own
> base classes.
>
> Thanks.
> Regards, Toby
>
> [0]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginTestBase.java
> [1]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/InternalLdapServer.java
>



-- 
Kiran Ayyagari
http://keydap.com