Skip to content

Commit

Permalink
Merge pull request #3 from atlassian/BIF-810-JEC-Latency
Browse files Browse the repository at this point in the history
BIF-810: Short polling is changed to long polling
  • Loading branch information
metehanozturk authored Feb 25, 2024
2 parents f722007 + 8effe17 commit 06a8538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion queue/sqs_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (qp *sqsProvider) ReceiveMessage(maxNumOfMessage int64, visibilityTimeout i
QueueUrl: &queueUrl,
MaxNumberOfMessages: aws.Int64(maxNumOfMessage),
VisibilityTimeout: aws.Int64(visibilityTimeout),
WaitTimeSeconds: aws.Int64(0),
WaitTimeSeconds: aws.Int64(20),
}

qp.refreshClientMu.RLock()
Expand Down
2 changes: 1 addition & 1 deletion queue/sqs_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestReceiveMessage(t *testing.T) {
assert.Equal(t, 2, len(messages))
assert.Equal(t, int64(30), *capturedInput.VisibilityTimeout)
assert.Equal(t, mockQueueUrl1, *capturedInput.QueueUrl)
assert.Equal(t, int64(0), *capturedInput.WaitTimeSeconds) // because of short polling
assert.Equal(t, int64(20), *capturedInput.WaitTimeSeconds)
assert.Equal(t, int64(10), *capturedInput.MaxNumberOfMessages)
assert.Equal(t, 2, len(capturedInput.MessageAttributeNames))
assert.Equal(t, "ownerId", *capturedInput.MessageAttributeNames[0])
Expand Down

0 comments on commit 06a8538

Please sign in to comment.