Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check circuit breaker config dump values #1706

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: "CircuitBreakerConfigDump"
context: "/circuit-breaker-config-dump"
id: "circuit-breaker-config-dump"
version: "3.14"
type: "REST"
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://backend:80"
resiliency:
timeout:
downstreamRequestIdleTimeout: 50
upstreamResponseTimeout: 30
circuitBreaker:
maxConnectionPools: 1115
maxConnections: 1111
maxPendingRequests: 1112
maxRequests: 1113
maxRetries: 1114
operations:
- target: "/get"
verb: "GET"
authTypeEnabled: true
scopes: [ ]
- target: "/anything/{path}"
verb: "GET"
authTypeEnabled: true
scopes: [ ]
- target: "/delay/{delay}"
verb: "GET"
authTypeEnabled: true
scopes: [ ]
- target: "/delay/{delay}"
verb: "POST"
authTypeEnabled: true
scopes: [ ]
- target: "/delay/{delay}"
verb: "PUT"
authTypeEnabled: true
scopes: [ ]
authentication:
- authType: JWT
enabled: true
sendTokenToUpstream: true
headerName: Authorization
headerEnable: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Feature: circuitBreakerMaxRequest
Scenario: Testing backend timeout
Given The system is ready
And I have a valid subscription
When I use the APK Conf file "artifacts/apk-confs/circuit-breaker-config-dump.yaml"
And the definition file "artifacts/definitions/employees_api.json"
And make the API deployment request
Then the response status code should be 200
Then I wait for 5 seconds
And I send "GET" request to "http://default.gw.wso2.com:9000/config_dump" with body ""
Then the response status code should be 200
And the response body should contain "\"max_connections\": 1111"
And the response body should contain "\"max_pending_requests\": 1112"
And the response body should contain "\"max_requests\": 1113"
And the response body should contain "\"max_retries\": 1114"
And the response body should contain "\"max_connection_pools\": 1115"

Scenario Outline: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "<apiID>"
Then the response status code should be <expectedStatusCode>

Examples:
| apiID | expectedStatusCode |
| circuit-breaker-config-dump | 202 |
Loading