Skip to content

Commit ce61ccb

Browse files
committed
fix: Update HTTPRoutePolicy test to use Eventually for status check
1 parent e7343d9 commit ce61ccb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/e2e/gatewayapi/httproute.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,12 +1070,13 @@ spec:
10701070
)
10711071

10721072
By("access dataplane to check the HTTPRoutePolicy")
1073-
s.NewAPISIXClient().
1074-
GET("/get").
1075-
WithHost("httpbin.example").
1076-
WithHeader("X-Route-Name", "httpbin").
1077-
Expect().
1078-
Status(http.StatusNotFound)
1073+
Eventually(func() int {
1074+
return s.NewAPISIXClient().
1075+
GET("/get").
1076+
WithHost("httpbin.example").
1077+
WithHeader("X-Route-Name", "httpbin").
1078+
Expect().Raw().StatusCode
1079+
}).WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusNotFound))
10791080

10801081
s.NewAPISIXClient().
10811082
GET("/get").

0 commit comments

Comments
 (0)