diff --git a/features/adapter_broadcast.feature b/features/adapter_broadcast.feature index 8063a2afd58a83bce89b2493b7e68b1152144d4c..56722123440475bcb2d61de27095f3d2e5705f18 100644 --- a/features/adapter_broadcast.feature +++ b/features/adapter_broadcast.feature @@ -21,12 +21,13 @@ Feature: Can the adapter broadcast messages? Given valid config When the adapter instance is created When the auth method is called - When a mock notify API response is configured to return a 403 error + When a mock notify API response is configured to return a 403 error When the broadcast method is called Then an error response is returned with status 403 Then the credentials are deleted Then the broadcast method was called with is_retry on - Then the getAuthorizationHeader method is called + Then the total number of calls to "broadcast" was 2 + Then the total number of calls to "getAuthorizationHeader" was 2 Scenario: On a retried 403 the message is not retried again Given valid config @@ -36,8 +37,8 @@ Feature: Can the adapter broadcast messages? When the broadcast method is called with is_retry on Then an error response is returned with status 403 Then the credentials are deleted - Then the "broadcast" method is not called again - + Then the total number of calls to "broadcast" was 1 + Scenario: On 503 the message is retried once with the same credentials Given valid config When the adapter instance is created @@ -47,7 +48,8 @@ Feature: Can the adapter broadcast messages? Then an error response is returned with status 503 Then the credentials are not deleted Then the broadcast method was called with is_retry on - Then the "getAuthorizationHeader" method is not called again + Then the total number of calls to "broadcast" was 2 + Then the total number of calls to "getAuthorizationHeader" was 1 Scenario: On a retried 503 the message is not retried again Given valid config @@ -57,4 +59,4 @@ Feature: Can the adapter broadcast messages? When the broadcast method is called with is_retry on Then an error response is returned with status 503 Then the credentials are not deleted - Then the "broadcast" method is not called again + Then the total number of calls to "broadcast" was 1 diff --git a/features/adapter_poll.feature b/features/adapter_poll.feature index 115d04bcf4fbb0d484e202e2c1df98443bf77b1a..bef9538354c4ee372aaed451a92af076a76a168f 100644 --- a/features/adapter_poll.feature +++ b/features/adapter_poll.feature @@ -50,7 +50,8 @@ Feature: Can the adapter receive messages? Then an error response is returned with status 403 Then the credentials are deleted Then the poll method was called with is_retry on - Then the getAuthorizationHeader method is called + Then the total number of calls to "poll" was 2 + Then the total number of calls to "getAuthorizationHeader" was 1 Scenario: On a retried 403 the message is not retried again Given valid config @@ -60,8 +61,8 @@ Feature: Can the adapter receive messages? When the poll method is called with is_retry on Then an error response is returned with status 403 Then the credentials are deleted - Then the "poll" method is not called again - + Then the total number of calls to "poll" was 1 + Scenario: On 503 the message is retried once with the same credentials Given valid config When the adapter instance is created @@ -71,7 +72,8 @@ Feature: Can the adapter receive messages? Then an error response is returned with status 503 Then the credentials are not deleted Then the poll method was called with is_retry on - Then the "getAuthorizationHeader" method is not called again + Then the total number of calls to "poll" was 2 + Then the total number of calls to "getAuthorizationHeader" was 1 Scenario: On a retried 503 the message is not retried again Given valid config @@ -81,5 +83,5 @@ Feature: Can the adapter receive messages? When the poll method is called with is_retry on Then an error response is returned with status 503 Then the credentials are not deleted - Then the "poll" method is not called again + Then the total number of calls to "poll" was 1 \ No newline at end of file diff --git a/features/adapter_publish.feature b/features/adapter_publish.feature index cd17cb575d7706f36c0faa94a2a8328757391212..6675b4edb9e2f6b118fb94eaa5d03f119a088672 100644 --- a/features/adapter_publish.feature +++ b/features/adapter_publish.feature @@ -26,7 +26,8 @@ Feature: Can the adapter publish messages? Then an error response is returned with status 403 Then the credentials are deleted Then the publish method was called with is_retry on - Then the getAuthorizationHeader method is called + Then the total number of calls to "publish" was 2 + Then the total number of calls to "getAuthorizationHeader" was 2 Scenario: On a retried 403 the message is not retried again Given valid config @@ -36,9 +37,9 @@ Feature: Can the adapter publish messages? When the publish method is called with is_retry on Then an error response is returned with status 403 Then the credentials are deleted - Then the "publish" method is not called again + Then the total number of calls to "publish" was 1 - Scenario: On 503 the message is retried once with new credentials + Scenario: On 503 the message is retried once with the same credentials Given valid config When the adapter instance is created When the auth method is called @@ -47,7 +48,8 @@ Feature: Can the adapter publish messages? Then an error response is returned with status 503 Then the credentials are not deleted Then the publish method was called with is_retry on - Then the "getAuthorizationHeader" method is not called again + Then the total number of calls to "publish" was 2 + Then the total number of calls to "getAuthorizationHeader" was 1 Scenario: On a retried 503 the message is not retried again Given valid config @@ -57,4 +59,5 @@ Feature: Can the adapter publish messages? When the publish method is called with is_retry on Then an error response is returned with status 503 Then the credentials are not deleted - Then the "publish" method is not called again + Then the total number of calls to "publish" was 1 + \ No newline at end of file