Skip to content

Commit f2193fb

Browse files
committed
apply suggestions
1 parent a0cbcfc commit f2193fb

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

test/e2e/crds/v2/route.go

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,13 @@ spec:
688688
failCount int
689689
)
690690

691-
time.Sleep(10 * time.Second)
691+
s.RequestAssert(&scaffold.RequestAssert{
692+
Method: "GET",
693+
Path: "/get",
694+
Host: "httpbin.org",
695+
Check: scaffold.WithExpectedStatus(http.StatusOK),
696+
Timeout: 10 * time.Second,
697+
})
692698
for range 90 {
693699
code := verifyRequest()
694700
if code == http.StatusOK {
@@ -737,7 +743,13 @@ spec:
737743
}
738744

739745
By("wait for route to be ready")
740-
time.Sleep(8 * time.Second)
746+
s.RequestAssert(&scaffold.RequestAssert{
747+
Method: "GET",
748+
Path: "/get",
749+
Host: "httpbin.org",
750+
Check: scaffold.WithExpectedStatus(http.StatusOK),
751+
Timeout: 10 * time.Second,
752+
})
741753
By("send requests to verify zero-weight behavior")
742754
for range 30 {
743755
code := verifyRequest()
@@ -774,7 +786,13 @@ spec:
774786
}
775787

776788
By("wait for route to be ready")
777-
time.Sleep(8 * time.Second)
789+
s.RequestAssert(&scaffold.RequestAssert{
790+
Method: "GET",
791+
Path: "/get",
792+
Host: "httpbin.org",
793+
Check: scaffold.WithExpectedStatus(http.StatusOK),
794+
Timeout: 10 * time.Second,
795+
})
778796
By("send requests to verify all requests routed to valid upstream")
779797
for range 30 {
780798
code := verifyRequest()

0 commit comments

Comments
 (0)