Skip to content

Commit 80820d6

Browse files
committed
fix e2e
1 parent 9050538 commit 80820d6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/e2e/gatewayapi/httproute.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -532,14 +532,16 @@ spec:
532532
`
533533
ResourceApplied("HTTPRoutePolicy", "http-route-policy-0", changedHTTPRoutePolicy, 1)
534534
// use the old vars cannot match any route
535-
s.NewAPISIXClient().
536-
GET("/get").
537-
WithHost("httpbin.example").
538-
WithHeader("X-Route-Name", "httpbin").
539-
WithHeader("X-HRP-Name", "http-route-policy-0").
540-
WithQuery("hrp_name", "http-route-policy-0").
541-
Expect().
542-
Status(http.StatusNotFound)
535+
Eventually(func() int {
536+
return s.NewAPISIXClient().
537+
GET("/get").
538+
WithHost("httpbin.example").
539+
WithHeader("X-Route-Name", "httpbin").
540+
WithHeader("X-HRP-Name", "http-route-policy-0").
541+
WithQuery("hrp_name", "http-route-policy-0").
542+
Expect().Raw().StatusCode
543+
}).WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusNotFound))
544+
543545
// use the new vars can match the route
544546
s.NewAPISIXClient().
545547
GET("/get").

0 commit comments

Comments
 (0)