Skip to content

Commit

Permalink
added unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw committed Dec 26, 2023
1 parent 43d9a47 commit ebd2c3b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions flytepropeller/pkg/controller/nodes/array/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,24 @@ func TestHandleArrayNodePhaseExecuting(t *testing.T) {
expectedTransitionPhase: handler.EPhaseRunning,
expectedExternalResourcePhases: []idlcore.TaskExecution_Phase{idlcore.TaskExecution_RUNNING},
},
{
name: "StartSubNodesNewAttempts",
subNodePhases: []v1alpha1.NodePhase{
v1alpha1.NodePhaseQueued,
v1alpha1.NodePhaseQueued,
},
subNodeTaskPhases: []core.Phase{
core.PhaseRetryableFailure,
core.PhaseWaitingForResources,
},
subNodeTransitions: []handler.Transition{
handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoRunning(&handler.ExecutionInfo{})),
handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoRunning(&handler.ExecutionInfo{})),
},
expectedArrayNodePhase: v1alpha1.ArrayNodePhaseExecuting,
expectedTransitionPhase: handler.EPhaseRunning,
expectedExternalResourcePhases: []idlcore.TaskExecution_Phase{idlcore.TaskExecution_RUNNING, idlcore.TaskExecution_RUNNING},
},
{
name: "AllSubNodesSuccedeed",
subNodePhases: []v1alpha1.NodePhase{
Expand Down

0 comments on commit ebd2c3b

Please sign in to comment.