Skip to content

Commit 41fa68a

Browse files
authored
Merge pull request #175 from DEFRA/feat/df-1006-wait-time
fix/df-1006: Increased waitTime
2 parents 6df3043 + 032b389 commit 41fa68a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/messaging/event.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export function receiveDlqMessages() {
4444
const command = new ReceiveMessageCommand({
4545
QueueUrl: deadLetterQueueUrl,
4646
MaxNumberOfMessages: 10,
47-
VisibilityTimeout: 0,
48-
WaitTimeSeconds: 0
47+
VisibilityTimeout: 3,
48+
WaitTimeSeconds: 3
4949
})
5050
return sqsClient.send(command)
5151
}
@@ -104,8 +104,8 @@ export async function deleteDlqMessage(messageId) {
104104
const receiveCommand = new ReceiveMessageCommand({
105105
QueueUrl: deadLetterQueueUrl,
106106
MaxNumberOfMessages: 10,
107-
VisibilityTimeout: 2,
108-
WaitTimeSeconds: 0
107+
VisibilityTimeout: 3,
108+
WaitTimeSeconds: 3
109109
})
110110
const messageResponse = await sqsClient.send(receiveCommand)
111111

src/messaging/event.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ describe('event', () => {
7070
await receiveDlqMessages()
7171
expect(snsMock).toHaveReceivedCommandWith(ReceiveMessageCommand, {
7272
QueueUrl: expect.any(String),
73-
VisibilityTimeout: 0,
74-
WaitTimeSeconds: 0
73+
VisibilityTimeout: 3,
74+
WaitTimeSeconds: 3
7575
})
7676
})
7777
})
@@ -105,8 +105,8 @@ describe('event', () => {
105105
expect(snsMock).toHaveReceivedCommandWith(ReceiveMessageCommand, {
106106
QueueUrl: expect.any(String),
107107
MaxNumberOfMessages: 10,
108-
VisibilityTimeout: 2,
109-
WaitTimeSeconds: 0
108+
VisibilityTimeout: 3,
109+
WaitTimeSeconds: 3
110110
})
111111
expect(snsMock).toHaveReceivedCommandWith(DeleteMessageCommand, {
112112
QueueUrl: expect.any(String),

0 commit comments

Comments
 (0)