Skip to content

Commit

Permalink
Allow failing pending workloads (#11539)
Browse files Browse the repository at this point in the history
  • Loading branch information
gosusnp committed Mar 6, 2024
1 parent 07d4e9b commit 1aaa54f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class WorkloadHandlerImpl(
val workload = getDomainWorkload(workloadId)

when (workload.status) {
WorkloadStatus.CLAIMED, WorkloadStatus.LAUNCHED, WorkloadStatus.RUNNING ->
WorkloadStatus.PENDING, WorkloadStatus.CLAIMED, WorkloadStatus.LAUNCHED, WorkloadStatus.RUNNING ->
workloadRepository.update(
workloadId,
WorkloadStatus.FAILURE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class WorkloadHandlerImplTest {
}

@ParameterizedTest
@EnumSource(value = WorkloadStatus::class, names = ["SUCCESS", "PENDING", "CANCELLED"])
@EnumSource(value = WorkloadStatus::class, names = ["SUCCESS", "CANCELLED"])
fun `test fail workload in inactive status`(workloadStatus: WorkloadStatus) {
every { workloadRepository.findById(WORKLOAD_ID) }.returns(
Optional.of(
Expand Down

0 comments on commit 1aaa54f

Please sign in to comment.