Package dev.galasa.framework
Class FrameworkRuns
java.lang.Object
dev.galasa.framework.FrameworkRuns
- All Implemented Interfaces:
IFrameworkRuns
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.galasa.framework.spi.IFrameworkRuns
IFrameworkRuns.SharedEnvironmentPhase -
Constructor Summary
ConstructorsConstructorDescriptionFrameworkRuns(IFramework framework) FrameworkRuns(IFramework framework, ITimeService timeService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRunRasAction(IRun run, RunRasAction rasActionToAdd) voidclearRunInterrupt(String runName) Clears all interrupt-related properties for a run with the given name from the DSS.booleangetAllGroupedRuns(@NotNull String groupName) getCpsPropertiesAndOverridesUsedByTestRun(String runName, List<String> namespaces) Returns a map of CPS properties and overrides that were used by a test run with the given run name.booleanmarkRunCancelling(String runName, TestRunLifecycleStatus currentStatus) Marks the specified run as finished in the DSS.voidmarkRunFinished(String runName, String result) booleanmarkRunInterrupted(String runName, String interruptReason) boolean@NotNull @NotNull IRunsubmitRun(String runType, String requestor, String bundleName, @NotNull String testName, String groupName, String mavenRepository, String obr, String stream, boolean local, boolean trace, Set<String> tags, Properties overrides, IFrameworkRuns.SharedEnvironmentPhase sharedEnvironmentPhase, String sharedEnvironmentRunName, String language, String submissionId)
-
Constructor Details
-
FrameworkRuns
- Throws:
FrameworkException
-
FrameworkRuns
- Throws:
FrameworkException
-
-
Method Details
-
getActiveRuns
- Specified by:
getActiveRunsin interfaceIFrameworkRuns- Throws:
FrameworkException
-
getQueuedRuns
- Specified by:
getQueuedRunsin interfaceIFrameworkRuns- Throws:
FrameworkException
-
getAllRuns
- Specified by:
getAllRunsin interfaceIFrameworkRuns- Throws:
FrameworkException
-
getAllGroupedRuns
@Override public List<IRun> getAllGroupedRuns(@NotNull @NotNull String groupName) throws FrameworkException - Specified by:
getAllGroupedRunsin interfaceIFrameworkRuns- Throws:
FrameworkException
-
getActiveRunNames
- Specified by:
getActiveRunNamesin interfaceIFrameworkRuns- Throws:
FrameworkException
-
delete
- Specified by:
deletein interfaceIFrameworkRuns- Throws:
DynamicStatusStoreException
-
reset
- Specified by:
resetin interfaceIFrameworkRuns- Throws:
DynamicStatusStoreException
-
addRunRasAction
@Override public void addRunRasAction(IRun run, RunRasAction rasActionToAdd) throws DynamicStatusStoreException - Specified by:
addRunRasActionin interfaceIFrameworkRuns- Throws:
DynamicStatusStoreException
-
markRunInterrupted
@Override public boolean markRunInterrupted(String runName, String interruptReason) throws DynamicStatusStoreException - Specified by:
markRunInterruptedin interfaceIFrameworkRuns- Throws:
DynamicStatusStoreException
-
clearRunInterrupt
Description copied from interface:IFrameworkRunsClears all interrupt-related properties for a run with the given name from the DSS.- Specified by:
clearRunInterruptin interfaceIFrameworkRuns- Parameters:
runName- the run to remove interrupt properties for- Throws:
DynamicStatusStoreException- if there was an issue accessing the DSS
-
markRunFinished
@Override public void markRunFinished(String runName, String result) throws DynamicStatusStoreException - Specified by:
markRunFinishedin interfaceIFrameworkRuns- Throws:
DynamicStatusStoreException
-
markRunCancelling
@Override public boolean markRunCancelling(String runName, TestRunLifecycleStatus currentStatus) throws DynamicStatusStoreException Description copied from interface:IFrameworkRunsMarks the specified run as finished in the DSS. Only if the state of the test run is as we expect. Other processes may have moved the status of the test run without us knowing.- Specified by:
markRunCancellingin interfaceIFrameworkRunscurrentStatus- The current status of the test run, the status we want to change it from- Returns:
- True if the test was marked as finished, false if not. For example, someother process marked it as starting or building ahead of us marking it as finished here.
- Throws:
DynamicStatusStoreException
-
getRun
- Specified by:
getRunin interfaceIFrameworkRuns- Throws:
DynamicStatusStoreException
-
getCpsPropertiesAndOverridesUsedByTestRun
@Override public Map<String,String> getCpsPropertiesAndOverridesUsedByTestRun(String runName, List<String> namespaces) throws FrameworkException Description copied from interface:IFrameworkRunsReturns a map of CPS properties and overrides that were used by a test run with the given run name. The returned map combines the current CPS properties from the given namespaces with the overrides associated with the given test run, so any overrides that were used will take precedence. If no test run with the given run name exists, then the current CPS properties from the provided namespaces will be returned.- Specified by:
getCpsPropertiesAndOverridesUsedByTestRunin interfaceIFrameworkRuns- Parameters:
runName- the name of the existing test run to get the CPS properties that were usednamespaces- a list of CPS namespaces to get CPS properties from- Returns:
- a map of CPS properties combined with any overrides for the given test run
- Throws:
FrameworkException- if there was an issue accessing the CPS or the DSS
-