Skip to content

Commit 9050538

Browse files
committed
Update test to use Eventually for status check
1 parent b2ea254 commit 9050538

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
@@ -641,12 +641,13 @@ spec:
641641
}
642642

643643
// assert that conflict policies are not in effect
644-
s.NewAPISIXClient().
645-
GET("/get").
646-
WithHost("httpbin.example").
647-
WithHeader("X-Route-Name", "httpbin").
648-
Expect().
649-
Status(http.StatusOK)
644+
Eventually(func() int {
645+
return s.NewAPISIXClient().
646+
GET("/get").
647+
WithHost("httpbin.example").
648+
WithHeader("X-Route-Name", "httpbin").
649+
Expect().Raw().StatusCode
650+
}).WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusOK))
650651
})
651652

652653
PIt("HTTPRoutePolicy status changes on HTTPRoute deleting", func() {

0 commit comments

Comments
 (0)