diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go index a89835fd0e..379bf0e70c 100644 --- a/e2e/knative/kamelet_test.go +++ b/e2e/knative/kamelet_test.go @@ -48,6 +48,7 @@ func TestKameletChange(t *testing.T) { Expect(CreateKnativeChannel(ns, knChannel)()).To(Succeed()) // Consumer route that will read from the KNative channel Expect(KamelRunWithID(operatorID, ns, "files/test-kamelet-display.groovy", "-w").Execute()).To(Succeed()) + Eventually(IntegrationPodPhase(ns, "test-kamelet-display")).Should(Equal(corev1.PodRunning)) // Create the Pipe Expect(KamelBindWithID(operatorID, ns, @@ -58,9 +59,9 @@ func TestKameletChange(t *testing.T) { "--annotation", "trait.camel.apache.org/health.readiness-initial-delay=10", "--name", timerPipe, ).Execute()).To(Succeed()) - - Eventually(IntegrationPodPhase(ns, timerPipe), TestTimeoutLong).Should(Equal(corev1.PodRunning)) + Eventually(IntegrationPodPhase(ns, timerPipe)).Should(Equal(corev1.PodRunning)) Eventually(IntegrationConditionStatus(ns, timerPipe, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) + // Consume the message Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("HelloKNative!")) Eventually(PipeCondition(ns, timerPipe, v1.PipeConditionReady), TestTimeoutMedium).Should(And( diff --git a/pkg/util/kubernetes/errors.go b/pkg/util/kubernetes/errors.go index dd86544662..05f8b9a6f0 100644 --- a/pkg/util/kubernetes/errors.go +++ b/pkg/util/kubernetes/errors.go @@ -22,5 +22,5 @@ import "strings" // IsUnknownAPIError checks if the given error is due to some missing APIs in the cluster. // Apparently there's no such method in Kubernetes Go API. func IsUnknownAPIError(err error) bool { - return err != nil && strings.HasPrefix(err.Error(), "no matches for kind") + return err != nil && (strings.HasPrefix(err.Error(), "no matches for kind") || strings.HasPrefix(err.Error(), "failed to get API group resources")) }