mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ctissot
21.20.2008 d650dd7c62ce38886ee5d653aef5be96a1232722
Fix issue 3547: Persistent search can not be abandoned
2 files modified
16 ■■■■ changed files
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java 12 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/core/AbandonOperationTestCase.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -1293,12 +1293,6 @@
          // searches are cancelled.
          CancelResult cancelResult = ps.cancel();
          if (keepStats && (cancelResult.getResultCode() ==
            ResultCode.CANCELED))
          {
            statTracker.updateAbandonedOperation();
          }
          return cancelResult;
        }
      }
@@ -1308,12 +1302,8 @@
    else
    {
      CancelResult cancelResult = op.cancel(cancelRequest);
      if (keepStats && (cancelResult.getResultCode() == ResultCode.CANCELED))
      {
        statTracker.updateAbandonedOperation();
      }
      return op.cancel(cancelRequest);
      return cancelResult;
    }
  }
opends/tests/unit-tests-testng/src/server/org/opends/server/core/AbandonOperationTestCase.java
@@ -204,7 +204,7 @@
                  conn.nextMessageID(), new ArrayList<Control>(), 1);
    abandonOperation.run();
    assertEquals(abandonOperation.getResultCode(),
                 ResultCode.NO_SUCH_OPERATION);
                 ResultCode.CANNOT_CANCEL);
    examineCompletedOperation(abandonOperation);
  }
@@ -532,7 +532,7 @@
    long abandonsCompleted = ldapStatistics.getOperationsAbandoned();
    // Create a "Who Am I?" extended oepration and send it to the server.  Make
    // Create a "Who Am I?" extended operation and send it to the server.  Make
    // sure to include the delay request control so it won't complete before we
    // can send the abandon request.
    ExtendedRequestProtocolOp whoAmIRequest =