| | |
| | | |
| | | |
| | | /** |
| | | * 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. |
| | | * |
| | |
| | | * |
| | | * @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")); |
| | |
| | | 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; |