This is an automated email from the ASF dual-hosted git repository. ronething pushed a commit to branch test/fix_websocket in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
commit 6d5a4ed0c5701ca4e81baf4238bec753ae891e45 Author: Ashing Zheng <[email protected]> AuthorDate: Thu Oct 30 10:37:34 2025 +0800 test: fix unstable websocket annotation test Signed-off-by: Ashing Zheng <[email protected]> --- test/e2e/ingress/annotations.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/e2e/ingress/annotations.go b/test/e2e/ingress/annotations.go index ad559528..249c6055 100644 --- a/test/e2e/ingress/annotations.go +++ b/test/e2e/ingress/annotations.go @@ -266,10 +266,19 @@ spec: It("websocket", func() { Expect(s.CreateResourceFromString(fmt.Sprintf(ingressWebSocket, s.Namespace()))).ShouldNot(HaveOccurred(), "creating Ingress") - routes, err := s.DefaultDataplaneResource().Route().List(context.Background()) - Expect(err).NotTo(HaveOccurred(), "listing Route") - Expect(routes).To(HaveLen(1), "checking Route length") - Expect(routes[0].EnableWebsocket).To(Equal(ptr.To(true)), "checking Route EnableWebsocket") + Eventually(func() bool { + routes, err := s.DefaultDataplaneResource().Route().List(context.Background()) + if err != nil { + return false + } + if len(routes) != 1 { + return false + } + if routes[0].EnableWebsocket == nil || !*routes[0].EnableWebsocket { + return false + } + return true + }).WithTimeout(30 * time.Second).ProbeEvery(2 * time.Second).Should(BeTrue()) }) })
