diff --git a/conformance/tests/inferencepool_resolvedrefs_condition.go b/conformance/tests/inferencepool_resolvedrefs_condition.go index 6ee182448..136bdc0c6 100644 --- a/conformance/tests/inferencepool_resolvedrefs_condition.go +++ b/conformance/tests/inferencepool_resolvedrefs_condition.go @@ -152,7 +152,7 @@ var InferencePoolParentStatus = suite.ConformanceTest{ t.Logf("Waiting for %v for Gateway conditions to update after deleting HTTPRoute %s", inferenceTimeoutConfig.HTTPRouteDeletionReconciliationTimeout, httpRouteSecondaryNN.String()) time.Sleep(inferenceTimeoutConfig.HTTPRouteDeletionReconciliationTimeout) - k8sutils.InferencePoolMustHaveNoParents(t, s.Client, poolNN) + k8sutils.InferencePoolMustHaveDefaultParent(t, s.Client, poolNN) t.Logf("InferencePool %s correctly shows no parent statuses, indicating it's no longer referenced.", poolNN.String()) trafficutils.MakeRequestAndExpectEventuallyConsistentResponse( diff --git a/conformance/utils/kubernetes/helpers.go b/conformance/utils/kubernetes/helpers.go index 39301e342..af6c4ad48 100644 --- a/conformance/utils/kubernetes/helpers.go +++ b/conformance/utils/kubernetes/helpers.go @@ -160,10 +160,10 @@ func InferencePoolMustHaveCondition(t *testing.T, c client.Reader, poolNN types. t.Log(logMsg) } -// InferencePoolMustHaveNoParents waits for the specified InferencePool resource -// to exist and report that it has no parent references in its status. -// This typically indicates it is no longer referenced by any Gateway API resources. -func InferencePoolMustHaveNoParents(t *testing.T, c client.Reader, poolNN types.NamespacedName) { +// InferencePoolMustHaveDefaultParent waits for the specified InferencePool resource +// to exist and report that it contains the default parent references in its status. +// This indicates no controller is managing the resource. +func InferencePoolMustHaveDefaultParent(t *testing.T, c client.Reader, poolNN types.NamespacedName) { t.Helper() var lastObservedPool *inferenceapi.InferencePool @@ -193,8 +193,15 @@ func InferencePoolMustHaveNoParents(t *testing.T, c client.Reader, poolNN types. lastObservedPool = pool lastError = nil - if len(pool.Status.Parents) == 0 { - t.Logf("InferencePool %s successfully has no parent statuses.", poolNN.String()) + if len(pool.Status.Parents) == 1 && + pool.Status.Parents[0].GatewayRef.Name == "default" && + pool.Status.Parents[0].Conditions != nil && + checkCondition(t, pool.Status.Parents[0].Conditions, metav1.Condition{ + Type: string(gatewayv1.GatewayConditionAccepted), + Status: "Unknown", + Reason: string(inferenceapi.InferencePoolReasonPending), + }) { + t.Logf("InferencePool %s successfully has the default parent statuses.", poolNN.String()) return true, nil } t.Logf("InferencePool %s still has %d parent statuses. Waiting...", poolNN.String(), len(pool.Status.Parents))