Skip to content

Commit 4451e66

Browse files
committed
fix(e2e): move deletion of sqs queues ti After call
1 parent a151925 commit 4451e66

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

features/sqs/messages.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ Feature: SQS Messages
1010
Then the result should include a message ID
1111
And the result should have an MD5 digest of "eb61eead90e3b899c6bcbe27ac581660"
1212
And I should eventually be able to receive "HELLO" from the queue
13-
Then I delete the SQS queue
1413

1514
Scenario: Binary payloads
1615
Given I create a queue with the prefix name "aws-js-sdk"
1716
When I send the message "HELLO" with a binary attribute
1817
Then the result should include a message ID
1918
And the result should have an MD5 digest of "eb61eead90e3b899c6bcbe27ac581660"
2019
And I should eventually be able to receive "HELLO" from the queue with a binary attribute
21-
Then I delete the SQS queue

features/sqs/queues.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ Feature: SQS Queues
88
Given I create a queue with the prefix name "aws-js-sdk"
99
And I create a queue with the prefix name "aws-js-sdk"
1010
Then list queues should eventually return the queue urls
11-
Then I delete the SQS queue
12-
Then I delete the SQS queue

features/sqs/step_definitions/queues.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,3 @@ Then("list queues should eventually return the queue urls", function (callback)
2929
{ maxTime: 60 }
3030
);
3131
});
32-
33-
Then("I delete the SQS queue", function (callback) {
34-
const url = this.createdQueues.pop();
35-
this.request(null, "deleteQueue", { QueueUrl: url }, callback);
36-
});

features/sqs/step_definitions/sqs.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ Before({ tags: "@sqs" }, function (scenario, callback) {
88
this.createdQueues = [];
99
callback();
1010
});
11+
12+
After({ tags: "@sqs" }, function (scenario, callback) {
13+
this.createdQueues.forEach((url) => {
14+
this.request(null, "deleteQueue", { QueueUrl: url });
15+
});
16+
callback();
17+
});

0 commit comments

Comments
 (0)