Skip to content

Commit

Permalink
Check circuit breaker config dump values
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsanan1 authored and tharindu1st committed Sep 6, 2023
1 parent 2e6fa28 commit 4eb2647
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
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 |

0 comments on commit 4eb2647

Please sign in to comment.