directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] [Commented] (DIRAPI-140) Test ClientSearchRequestTest.testSubDn() fails
Date Tue, 21 May 2013 00:37:15 GMT


Emmanuel Lecharny commented on DIRAPI-140:

Ok, get it...

This is a vicious problem, but not really a bug.

What happens is that in the test, we do one single, then we close the cursor.
At this point, we may not have yet received the SearchResultDone, and in this case, closing
the cursor results in the sending of a Disconnect extended request.

Changing the test to be 

    for ( int i = 0; i < 1000; i++ )
        System.out.println( "Loop " + i );

        SearchRequest req = new SearchRequestImpl();

        SearchCursor searchCursor = req );

        while ( )


make it passes, even with 100000 loops ( I did the test :-)

Now, the question is : how should we deal with that ? Should we send an abandon request to
the server in this premature close ? All in all, I'm not sure how we can detect that we don't
have anymore result when we do the close, we may potentially have hundreds...

I do think that it's not a bug, in fact...
> Test ClientSearchRequestTest.testSubDn() fails
> ----------------------------------------------
>                 Key: DIRAPI-140
>                 URL:
>             Project: Directory Client API
>          Issue Type: Bug
>         Environment: Apache Maven 3.0.5 (rNON-CANONICAL_2013-02-25_10-23_root; 2013-02-25
> Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.9.2-1-arch", arch: "amd64", family: "unix"
>            Reporter: Stefan Seelmann
> In trunk the test ClientSearchRequestTest.testSubDn (module ldap-client-test) fails quite
often. When adding a for loop around the test code it fails after 1-10 executions. The first
search works always, but the second search which uses the SearchRequest object sometimes doesn't
contain a result and is false. Please note that I'm not sure if that is
a pb in client or in the server.

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:

View raw message