Skip to content

Commit

Permalink
Timeouts - add test case for disabling a timeout (#2823)
Browse files Browse the repository at this point in the history
* Timeouts - add test cases for disabling a timeout

* reduce timeout to 1s

* make all delays in timeout test 1s
  • Loading branch information
dprotaso committed Apr 5, 2024
1 parent 1646f69 commit 8be7987
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conformance/tests/httproute-timeout-backend-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ var HTTPRouteTimeoutBackendRequest = suite.ConformanceTest{
Request: http.Request{Path: "/backend-timeout?delay=1s"},
Response: http.Response{StatusCode: 504},
Namespace: ns,
}, {
Request: http.Request{Path: "/disable-backend-timeout?delay=1s"},
Response: http.Response{StatusCode: 200},
Namespace: ns,
},
}

Expand Down
9 changes: 9 additions & 0 deletions conformance/tests/httproute-timeout-backend-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ spec:
port: 8080
timeouts:
backendRequest: 500ms
- matches:
- path:
type: PathPrefix
value: /disabled-backend-timeout
backendRefs:
- name: infra-backend-v1
port: 8080
timeouts:
backendRequest: "0s"
4 changes: 4 additions & 0 deletions conformance/tests/httproute-timeout-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ var HTTPRouteTimeoutRequest = suite.ConformanceTest{
Request: http.Request{Path: "/request-timeout?delay=1s"},
Response: http.Response{StatusCode: 504},
Namespace: ns,
}, {
Request: http.Request{Path: "/disable-request-timeout?delay=1s"},
Response: http.Response{StatusCode: 200},
Namespace: ns,
},
}

Expand Down
9 changes: 9 additions & 0 deletions conformance/tests/httproute-timeout-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ spec:
port: 8080
timeouts:
request: 500ms
- matches:
- path:
type: PathPrefix
value: /disable-request-timeout
backendRefs:
- name: infra-backend-v1
port: 8080
timeouts:
request: "0s"

0 comments on commit 8be7987

Please sign in to comment.