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

neil_a_wilson
05.51.2007 77dcb75fb0bf9c03a591297519a97f2f3b69dbf0
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;