directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Alain RIVIERE <parivi...@ippon.fr>
Subject Re: ApacheDS non US-ASCII DN manipulation?
Date Wed, 31 Jan 2007 10:59:11 GMT
Emmanuel Lecharny wrote:
> On 1/31/07, Pierre-Alain RIVIERE <pariviere@ippon.fr> wrote:
>
> Anyway, that's always good for us :)
>
> <snip/>
>
> Hmmmm... Is it possible you copy/paste a full unit test so that I can 
> try it
> on my computer ? If you want to know how we do our integration tests, 
> have a
> look at :
> http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java?revision=499512&view=markup

>
>
I've attached to the mail the AbstractTestCase for all my unit tests 
that needs access to an LDAP server.

In fact, when I started working on ApacheDS integration in my unit test, 
I've tried first to use the AbstractServerTest class coming from 
server-unit. But at this moment I did not succeed to make my own 
customization - setting up a new partition -. So I wrote this class. And 
yes, it's pretty slow to process partition initialization and starting 
up the server for each unit test.

I've also joined a test.

getUserGroups(LDAPUser) just generates a search filter like this
    "(&(member=cn=Pierre-Alain 
RIVIERE,ou=Peoples,ou=Paris,ou=Offices,dc=ippon,dc=fr)(objectClass=ipponGroup))" 

or this
    "(&(member=cn=Stéphane 
DUPONT,ou=Peoples,ou=Paris,ou=Offices,dc=ippon,dc=fr)(objectClass=ipponGroup))"
and then pass it to

           SearchControls controls = new SearchControls();
           controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
           NamingEnumeration<SearchResult> results =
                       context.search(baseDN, searchFilter, controls);

where context is given by the IpponAbstractServerTest.

I've not really test if the things goes well if an ipponGroup 
objectClass contains only member attribute's values with not problematic 
characters (é for example), but from what I've seen with the debugger it 
should be OK - when there's no problematic characters a String is passed 
to DnNormalizer#normalize(Object) method, in the other case it's a byte[].

> <snip/>
>
> I can't guarantee it 100% without being able to reproduce the test by
> myself. The best I can do is to test your test and see what can be the
> problem. Sorry for the burden.
>
> Btw, which version of the server are you currently using ?

I'm using 1.0.0 version available from the maven repository

    <dependency>
      <groupId>org.apache.directory.server</groupId>
      <artifactId>apacheds-core</artifactId>
      <version>1.0.0</version>
    </dependency>


Mime
View raw message