From d19acb303c4ff90e48fd98ce2d7ba739ca9ea2db Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 18 Nov 2009 16:55:52 +0000
Subject: [PATCH] Fix for Issue 4300 : stop replication server cause OutOfMemoryError

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
index a46136a..7ef92f1 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -1231,17 +1231,31 @@
    * Deletes the provided entry from the Directory Server using an
    * internal operation.
    *
-   * @param  entry  The entry to be added.
+   * @param  entry  The entry to be deleted.
    *
    * @throws  Exception  If an unexpected problem occurs.
    */
   public static void deleteEntry(Entry entry)
          throws Exception
   {
+    deleteEntry(entry.getDN());
+  }
+
+  /**
+   * Deletes the provided entry from the Directory Server using an
+   * internal operation.
+   *
+   * @param  dn  The dn of entry to be deleted
+   *
+   * @throws  Exception  If an unexpected problem occurs.
+   */
+  public static void deleteEntry(DN dn)
+         throws Exception
+  {
     InternalClientConnection conn =
          InternalClientConnection.getRootConnection();
 
-    DeleteOperation deleteOperation = conn.processDelete(entry.getDN());
+    DeleteOperation deleteOperation = conn.processDelete(dn);
     assertEquals(deleteOperation.getResultCode(), ResultCode.SUCCESS);
   }
 

--
Gitblit v1.10.0