Class PlanExecutionLatch


  • public class PlanExecutionLatch
    extends Object
    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.
    • Constructor Detail

      • PlanExecutionLatch

        public PlanExecutionLatch()
        Construct a new PlanExecutionLatch. Note that this should not be shared across plans.
    • 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.