Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1173

Delete operation with a PersistentSearch returns the deleted entry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.2
    • 2.0.0-M1
    • None
    • None

    Description

      While debugging a failure in PersistentSearch I found that we have an inconsistant behavior when deleting entries :

      testPsearchDelete :
      ctx.destroySubcontext( RDN ); // RDN = "cn=Tori Amos"
      ...
      assertNotNull( listener.result ); // Should be null, but is not
      assertEquals( RDN, listener.result.getName() ); // Contains the deleted entry...

      Another test :

      testPsearchAbandon :
      ctx.destroySubcontext( "cn=Jack Black" );
      ...
      // there seems to be a race condition here
      //assertNull( listener.result ); // Has been commented as otherwise, the test would fail
      ...

      Note the comment...

      While looking into the PersistentSearchListener code, here is what we have :

      public void objectRemoved( NamingEvent evt )

      { // send the entry back sendEntry( evt ); }

      This sendEntry method simply return the deleted entry, and is supposed to set the PersistentSearchControl, so the test is incorrect. We should test that the Control contains the correct ChangeType

      Attachments

        Issue Links

          Activity

            People

              akiran Kiran Ayyagari
              elecharny Emmanuel Lécharny
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: