Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-adapter-testsuite
Commits
f00902ea
Unverified
Commit
f00902ea
authored
2 years ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
refactor: change how call counts are expected
parent
a89f9bf6
This commit is part of merge request
!5
. Comments created here will be created in the context of that merge request.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
16 deletions
+23
-16
features/adapter_broadcast.feature
features/adapter_broadcast.feature
+8
-6
features/adapter_poll.feature
features/adapter_poll.feature
+7
-5
features/adapter_publish.feature
features/adapter_publish.feature
+8
-5
No files found.
features/adapter_broadcast.feature
Edit
View file @
f00902ea
...
@@ -21,12 +21,13 @@ Feature: Can the adapter broadcast messages?
...
@@ -21,12 +21,13 @@ Feature: Can the adapter broadcast messages?
Given
valid config
Given
valid config
When
the adapter instance is created
When
the adapter instance is created
When
the auth method is called
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
When
the broadcast method is called
Then
an error response is returned with status 403
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the credentials are deleted
Then
the broadcast method was called with is_retry on
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
Scenario
:
On a retried 403 the message is not retried again
Given
valid config
Given
valid config
...
@@ -36,8 +37,8 @@ Feature: Can the adapter broadcast messages?
...
@@ -36,8 +37,8 @@ Feature: Can the adapter broadcast messages?
When
the broadcast method is called with is_retry on
When
the broadcast method is called with is_retry on
Then
an error response is returned with status 403
Then
an error response is returned with status 403
Then
the credentials are deleted
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
Scenario
:
On 503 the message is retried once with the same credentials
Given
valid config
Given
valid config
When
the adapter instance is created
When
the adapter instance is created
...
@@ -47,7 +48,8 @@ Feature: Can the adapter broadcast messages?
...
@@ -47,7 +48,8 @@ Feature: Can the adapter broadcast messages?
Then
an error response is returned with status 503
Then
an error response is returned with status 503
Then
the credentials are not deleted
Then
the credentials are not deleted
Then
the broadcast method was called with is_retry on
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
Scenario
:
On a retried 503 the message is not retried again
Given
valid config
Given
valid config
...
@@ -57,4 +59,4 @@ Feature: Can the adapter broadcast messages?
...
@@ -57,4 +59,4 @@ Feature: Can the adapter broadcast messages?
When
the broadcast method is called with is_retry on
When
the broadcast method is called with is_retry on
Then
an error response is returned with status 503
Then
an error response is returned with status 503
Then
the credentials are not deleted
Then
the credentials are not deleted
Then
the
"broadcast"
method is not called again
Then
the
total number of calls to
"broadcast"
was 1
This diff is collapsed.
Click to expand it.
features/adapter_poll.feature
Edit
View file @
f00902ea
...
@@ -50,7 +50,8 @@ Feature: Can the adapter receive messages?
...
@@ -50,7 +50,8 @@ Feature: Can the adapter receive messages?
Then
an error response is returned with status 403
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the credentials are deleted
Then
the poll method was called with is_retry on
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
Scenario
:
On a retried 403 the message is not retried again
Given
valid config
Given
valid config
...
@@ -60,8 +61,8 @@ Feature: Can the adapter receive messages?
...
@@ -60,8 +61,8 @@ Feature: Can the adapter receive messages?
When
the poll method is called with is_retry on
When
the poll method is called with is_retry on
Then
an error response is returned with status 403
Then
an error response is returned with status 403
Then
the credentials are deleted
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
Scenario
:
On 503 the message is retried once with the same credentials
Given
valid config
Given
valid config
When
the adapter instance is created
When
the adapter instance is created
...
@@ -71,7 +72,8 @@ Feature: Can the adapter receive messages?
...
@@ -71,7 +72,8 @@ Feature: Can the adapter receive messages?
Then
an error response is returned with status 503
Then
an error response is returned with status 503
Then
the credentials are not deleted
Then
the credentials are not deleted
Then
the poll method was called with is_retry on
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
Scenario
:
On a retried 503 the message is not retried again
Given
valid config
Given
valid config
...
@@ -81,5 +83,5 @@ Feature: Can the adapter receive messages?
...
@@ -81,5 +83,5 @@ Feature: Can the adapter receive messages?
When
the poll method is called with is_retry on
When
the poll method is called with is_retry on
Then
an error response is returned with status 503
Then
an error response is returned with status 503
Then
the credentials are not deleted
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
This diff is collapsed.
Click to expand it.
features/adapter_publish.feature
Edit
View file @
f00902ea
...
@@ -26,7 +26,8 @@ Feature: Can the adapter publish messages?
...
@@ -26,7 +26,8 @@ Feature: Can the adapter publish messages?
Then
an error response is returned with status 403
Then
an error response is returned with status 403
Then
the credentials are deleted
Then
the credentials are deleted
Then
the publish method was called with is_retry on
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
Scenario
:
On a retried 403 the message is not retried again
Given
valid config
Given
valid config
...
@@ -36,9 +37,9 @@ Feature: Can the adapter publish messages?
...
@@ -36,9 +37,9 @@ Feature: Can the adapter publish messages?
When
the publish method is called with is_retry on
When
the publish method is called with is_retry on
Then
an error response is returned with status 403
Then
an error response is returned with status 403
Then
the credentials are deleted
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
Given
valid config
When
the adapter instance is created
When
the adapter instance is created
When
the auth method is called
When
the auth method is called
...
@@ -47,7 +48,8 @@ Feature: Can the adapter publish messages?
...
@@ -47,7 +48,8 @@ Feature: Can the adapter publish messages?
Then
an error response is returned with status 503
Then
an error response is returned with status 503
Then
the credentials are not deleted
Then
the credentials are not deleted
Then
the publish method was called with is_retry on
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
Scenario
:
On a retried 503 the message is not retried again
Given
valid config
Given
valid config
...
@@ -57,4 +59,5 @@ Feature: Can the adapter publish messages?
...
@@ -57,4 +59,5 @@ Feature: Can the adapter publish messages?
When
the publish method is called with is_retry on
When
the publish method is called with is_retry on
Then
an error response is returned with status 503
Then
an error response is returned with status 503
Then
the credentials are not deleted
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
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment