Unverified Commit 1fd8622a authored by Dan Jones's avatar Dan Jones
Browse files

fix: count api calls to /token

getAuthorizationHeader is called again but only
requests a new token if a valid one is not available
parent f00902ea
......@@ -27,7 +27,7 @@ Feature: Can the adapter broadcast messages?
Then the credentials are deleted
Then the broadcast method was called with is_retry on
Then the total number of calls to "broadcast" was 2
Then the total number of calls to "getAuthorizationHeader" was 2
Then the total number of "GET" requests to "/token" was 2
Scenario: On a retried 403 the message is not retried again
Given valid config
......@@ -49,7 +49,7 @@ Feature: Can the adapter broadcast messages?
Then the credentials are not deleted
Then the broadcast method was called with is_retry on
Then the total number of calls to "broadcast" was 2
Then the total number of calls to "getAuthorizationHeader" was 1
Then the total number of "GET" requests to "/token" was 1
Scenario: On a retried 503 the message is not retried again
Given valid config
......
......@@ -51,7 +51,7 @@ Feature: Can the adapter receive messages?
Then the credentials are deleted
Then the poll method was called with is_retry on
Then the total number of calls to "poll" was 2
Then the total number of calls to "getAuthorizationHeader" was 1
Then the total number of "GET" requests to "/token" was 2
Scenario: On a retried 403 the message is not retried again
Given valid config
......@@ -73,8 +73,8 @@ Feature: Can the adapter receive messages?
Then the credentials are not deleted
Then the poll method was called with is_retry on
Then the total number of calls to "poll" was 2
Then the total number of calls to "getAuthorizationHeader" was 1
Then the total number of "GET" requests to "/token" was 1
Scenario: On a retried 503 the message is not retried again
Given valid config
When the adapter instance is created
......
......@@ -27,7 +27,7 @@ Feature: Can the adapter publish messages?
Then the credentials are deleted
Then the publish method was called with is_retry on
Then the total number of calls to "publish" was 2
Then the total number of calls to "getAuthorizationHeader" was 2
Then the total number of "GET" requests to "/token" was 2
Scenario: On a retried 403 the message is not retried again
Given valid config
......@@ -49,7 +49,7 @@ Feature: Can the adapter publish messages?
Then the credentials are not deleted
Then the publish method was called with is_retry on
Then the total number of calls to "publish" was 2
Then the total number of calls to "getAuthorizationHeader" was 1
Then the total number of "GET" requests to "/token" was 1
Scenario: On a retried 503 the message is not retried again
Given valid config
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment