| | |
| | | import static org.opends.server.protocols.internal.Requests.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** |
| | | * A base class for all tasks test cases. |
| | | */ |
| | | /** A base class for all tasks test cases. */ |
| | | @Test(groups = { "precommit", "tasks" }, sequential = true) |
| | | public class TasksTestCase extends DirectoryServerTestCase { |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the specified task from the server, waiting for it to finish all |
| | | * the running its going to do before returning. |
| | |
| | | * @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(final DN taskEntryDN) throws Exception |
| | | public static Task getDoneTask(final DN taskEntryDN) throws Exception |
| | | { |
| | | final Task task = getTask(taskEntryDN); |
| | | |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public static void waitTaskCompletedSuccessfully(DN taskDN) throws Exception |
| | | { |
| | | Task task = getDoneTask(taskDN); |
| | | assertNotNull(task); |
| | | assertEquals(task.getTaskState(), TaskState.COMPLETED_SUCCESSFULLY); |
| | | } |
| | | } |