From 77dcb75fb0bf9c03a591297519a97f2f3b69dbf0 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 05 Sep 2007 06:51:34 +0000
Subject: [PATCH] Implement support for delete and modify operations in the task backend as follows:

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java
index 666ea9e..08968ff 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java
@@ -157,8 +157,8 @@
 
 
   /**
-   * Retrieves the specified task from the server, waiting for it to finish all
-   * the running its going to do before returning.
+   * Retrieves the specified task from the server, regardless of its current
+   * state.
    *
    * @param  taskEntryDN  The DN of the entry for the task to retrieve.
    *
@@ -166,8 +166,9 @@
    *
    * @throws  Exception  If an unexpected problem occurs.
    */
-  protected Task getCompletedTask(DN taskEntryDN)
-          throws Exception
+  @Test(enabled=false) // This isn't a test method, but TestNG thinks it is.
+  public static Task getTask(DN taskEntryDN)
+         throws Exception
   {
     TaskBackend taskBackend =
          (TaskBackend) DirectoryServer.getBackend(DN.decode("cn=tasks"));
@@ -188,6 +189,27 @@
                                taskEntryDN.toString());
     }
 
+    return task;
+  }
+
+
+
+  /**
+   * Retrieves the specified task from the server, waiting for it to finish all
+   * the running its going to do before returning.
+   *
+   * @param  taskEntryDN  The DN of the entry for the task to retrieve.
+   *
+   * @return  The requested task entry.
+   *
+   * @throws  Exception  If an unexpected problem occurs.
+   */
+  @Test(enabled=false) // This isn't a test method, but TestNG thinks it is.
+  public static Task getCompletedTask(DN taskEntryDN)
+          throws Exception
+  {
+    Task task = getTask(taskEntryDN);
+
     if (! TaskState.isDone(task.getTaskState()))
     {
       long stopWaitingTime = System.currentTimeMillis() + 20000L;

--
Gitblit v1.10.0