Package com.atlassian.confluence.it
Class LongRunningTask
- java.lang.Object
-
- com.atlassian.confluence.it.LongRunningTask
-
- Direct Known Subclasses:
DeferredLongRunningTask
public class LongRunningTask extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringLONGRUNNINGTASK_ACTION
-
Constructor Summary
Constructors Modifier Constructor Description protectedLongRunningTask(net.sourceforge.jwebunit.junit.WebTester tester, String taskId, String contextPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LongRunningTaskgetInstance(String taskId)static LongRunningTaskgetInstance(String taskId, net.sourceforge.jwebunit.junit.WebTester webTester)static LongRunningTaskgetInstanceForDisplayedTask()static LongRunningTaskgetInstanceForDisplayedTask(net.sourceforge.jwebunit.junit.WebTester tester)static LongRunningTaskgetInstanceForSetup(String taskId)static LongRunningTaskgetInstanceForSetup(String taskId, net.sourceforge.jwebunit.junit.WebTester webTester)booleanwaitToComplete(long timeout, TimeUnit unit, String errorText)booleanwaitToComplete(long timeout, TimeUnit unit, String pageLocation, String waitForText, String errorText)Wait for the current long running task to complete.
-
-
-
Field Detail
-
LONGRUNNINGTASK_ACTION
public static final String LONGRUNNINGTASK_ACTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceForSetup
public static LongRunningTask getInstanceForSetup(String taskId)
-
getInstanceForSetup
public static LongRunningTask getInstanceForSetup(String taskId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
getInstance
public static LongRunningTask getInstance(String taskId)
-
getInstance
public static LongRunningTask getInstance(String taskId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
getInstanceForDisplayedTask
public static LongRunningTask getInstanceForDisplayedTask()
-
getInstanceForDisplayedTask
public static LongRunningTask getInstanceForDisplayedTask(net.sourceforge.jwebunit.junit.WebTester tester)
-
waitToComplete
public boolean waitToComplete(long timeout, TimeUnit unit, String pageLocation, String waitForText, String errorText)Wait for the current long running task to complete. This is indicated either by completion getting to 100% or a particular string which indicates an error appearing in the response.- Parameters:
timeout- fail after this many time units if the long running task has not completed.unit- the units for the timeout.pageLocation- the relative location to poll.waitForText- the text which indicates the long running task has finished.errorText- the appearance of this string in the response indicates that the task has completed with an error.- Returns:
- true if the task completed successfully, otherwise false.
-
-