Class PlanExecutionLatch
- java.lang.Object
-
- com.atlassian.bamboo.testutils.backdoor.plans.PlanExecutionLatch
-
public class PlanExecutionLatch extends Object
Facilitates blocking execution of a plan. Pass the output ofgetTaskScript()
into a plan's script task, and then executions of that plan will not complete until a timeout of 10 seconds, orreleaseExecution(int)
is called with the build number.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlanExecutionLatch.Builder
-
Constructor Summary
Constructors Constructor Description PlanExecutionLatch()
Construct a new PlanExecutionLatch.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description File
awaitLockFileExistence(int buildNumber)
Await for the lock file to be created by the build.static PlanExecutionLatch.Builder
builder()
String
getTaskScript()
Get the task script which will be blocked per-build by this object.void
releaseExecution(int buildNumber)
Allow the given execution to complete.
-
-
-
Method Detail
-
getTaskScript
public String getTaskScript()
Get the task script which will be blocked per-build by this object. Note that this script cannot be typed into the script editor by webdriver.- Returns:
- a script suitable for passing into a script task.
-
awaitLockFileExistence
public File awaitLockFileExistence(int buildNumber)
Await for the lock file to be created by the build.- Parameters:
buildNumber
- e.g. 1 for the first build of a plan.
-
releaseExecution
public void releaseExecution(int buildNumber)
Allow the given execution to complete. This method will wait for the plan execution to start before it returns.- Parameters:
buildNumber
- e.g. 1 for the first build of a plan.
-
builder
public static PlanExecutionLatch.Builder builder()
-
-