Class PlanExecutionLatch
java.lang.Object
com.atlassian.bamboo.testutils.backdoor.plans.PlanExecutionLatch
Facilitates blocking execution of a plan. Pass the output of
getTaskScript()
into a plan's script
task, and then executions of that plan will not complete until a timeout of 10 seconds, or releaseExecution(int)
is called with the build number.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionawaitLockFileExistence
(int buildNumber) Await for the lock file to be created by the build.static PlanExecutionLatch.Builder
builder()
Get the task script which will be blocked per-build by this object.void
releaseExecution
(int buildNumber) Allow the given execution to complete.
-
Constructor Details
-
PlanExecutionLatch
public PlanExecutionLatch()Construct a new PlanExecutionLatch. Note that this should not be shared across plans.
-
-
Method Details
-
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
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
-