From cc4c99b68c029772ab7735c6913accf1c00adb76 Mon Sep 17 00:00:00 2001 From: Paul Dittamo Date: Thu, 14 Dec 2023 09:36:16 -0800 Subject: [PATCH] update unit test Signed-off-by: Paul Dittamo --- flyteplugins/go/tasks/plugins/array/k8s/management_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flyteplugins/go/tasks/plugins/array/k8s/management_test.go b/flyteplugins/go/tasks/plugins/array/k8s/management_test.go index 8d2696d02b..ab26028b09 100644 --- a/flyteplugins/go/tasks/plugins/array/k8s/management_test.go +++ b/flyteplugins/go/tasks/plugins/array/k8s/management_test.go @@ -679,9 +679,11 @@ func TestTerminateSubTasks(t *testing.T) { assert.Nil(t, err) assert.Equal(t, uint32(1), nextState.PhaseVersion) assert.Equal(t, arrayCore.PhaseWriteToDiscoveryThenFail, nextState.CurrentPhase) - assert.Len(t, externalResources, subtaskCount) + assert.Len(t, externalResources, terminateCounter) + for _, externalResource := range externalResources { - assert.True(t, externalResource.IsAbortedSubtask || core.Phases[externalResource.Phase].IsTerminal() || core.Phases[externalResource.Phase] == core.PhaseUndefined) + phase := core.Phases[externalResource.Phase] + assert.True(t, phase.IsAborted()) } }) }