From ebd2c3b210c38333ec9b679493e7b5d0b483b29e Mon Sep 17 00:00:00 2001 From: Daniel Rammer Date: Tue, 26 Dec 2023 10:18:09 -0600 Subject: [PATCH] added unit test Signed-off-by: Daniel Rammer --- .../pkg/controller/nodes/array/handler_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/flytepropeller/pkg/controller/nodes/array/handler_test.go b/flytepropeller/pkg/controller/nodes/array/handler_test.go index fbb5ae875c..b0328250ab 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/array/handler_test.go @@ -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{