|
[
Permlink
| « Hide
]
Stefan Zoerner added a comment - 08/Aug/06 08:52 PM
This issues dealed with the creation of entries with multivalued RDNs as well.
JUnit testcase to demonstrate this issue. It uses JNDI. Note that only the test case testMultiValuedRdnName fails with Apache DS. I have checked this test with the following servers:
* OpenLDAP 2.3 * Sun Java System Directory Server 5.2 * IBM Tivoli Directory Server 6.0 For these three servers, it passes completely. This looks like an LDAP DN issue. It happens after an add all to the LDAP dn. Here's a test that shows how this is broken:
/** * Test to see if a DN with multiRdn values is preserved after an addAll. */ public void testAddAllWithMultivaluedAttribute() throws InvalidNameException { LdapDN dn = new LdapDN( "cn=Kate Bush+sn=Bush,ou=system" ); LdapDN target = new LdapDN(); target.addAll( target.size(), dn ); assertEquals( "cn=Kate Bush+sn=Bush,ou=system", target.toString() ); assertEquals( "cn=Kate Bush+sn=Bush,ou=system", target.getUpName() ); } Trying to fix this now. I've isolated the problem to the upName calculation in the RdnParser for an Rdn. Here are some unit tests that show the problem exactly.
This is way over my head right now. Having a hard time understanding this code. I'll wait for Emmanuel to come back and fix this one.
Emmanuel this is a patch which adds Stefan's tests to the SVN repository in 1.0 branch. Once you fix this issue please apply this patch here and to 1.1 trunks. If you want me to do it just assign me the issue after fixing the Rdn problem I can confirm the integration tests.
Fixed in revision 431163 & 431164 for 1.0 and 1.1 branches.
This was a stupid mistake... (does anybody have heard about intelligent mistakes ? ;), upName was computed before the loop which parse the others atavs. Emmanuel did you apply the patch that adds Stefan's tests? If not want me to apply them?
I can confirm that the test case attached to this issue works fine now with Apache DS 1.0 RC 4. Therefore I close the issue.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||