Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: GeoNet/Actions/.github/workflows/reusable-go-apps.yml@main
with:
testSetup: |
docker run --name localstack -d --rm -p 4566:4566 -p 4510-4559:4510-4559 docker.io/localstack/localstack:4.0.3
docker run --name localstack -d --rm -p 4566:4566 -p 4510-4559:4510-4559 docker.io/localstack/localstack:4.10.0
echo "waiting for localstack to be ready"
until curl -v localhost:4566; do
sleep 1s
Expand Down
3 changes: 2 additions & 1 deletion aws/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
## Wrapper files for AWS-SDK-GO ##

These files are to simplify how applications interact with the AWS SDK for Go.
These files are to simplify how applications interact with the AWS SDK for Go.
The functions are expected to be in line with the underlying AWS service.
2 changes: 1 addition & 1 deletion aws/sqs/sqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (s *SQS) SendNBatch(ctx context.Context, queueURL string, bodies []string)

const (
maxCount = 10
maxSize = 262144 // 256 KiB
maxSize = 1048576 // 1 MiB
)

allErrors := make([]error, 0)
Expand Down
21 changes: 6 additions & 15 deletions aws/sqs/sqs_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,8 @@ func TestSendBatch(t *testing.T) {
require.Nil(t, err, fmt.Sprintf("error creating sqs client: %v", err))

// ACTION
var maxBytes int = 262144
maxSizeSingleMessage := ""
for range maxBytes {
maxSizeSingleMessage += "a"
}
var maxBytes int = 1048576
maxSizeSingleMessage := strings.Repeat("a", maxBytes)
err = client.SendBatch(context.TODO(), awsCmdQueueURL(), []string{maxSizeSingleMessage})

// ASSERT
Expand All @@ -474,11 +471,8 @@ func TestSendBatch(t *testing.T) {
assert.NotNil(t, err)

// ACTION
var maxHalfBytes int = 131072
maxHalfSizeMessage := ""
for range maxHalfBytes {
maxHalfSizeMessage += "a"
}
var maxHalfBytes int = 524288
maxHalfSizeMessage := strings.Repeat("a", maxHalfBytes)
err = client.SendBatch(context.TODO(), awsCmdQueueURL(), []string{maxHalfSizeMessage, maxHalfSizeMessage})

// ASSERT
Expand Down Expand Up @@ -531,11 +525,8 @@ func TestSendNBatch(t *testing.T) {
require.Nil(t, err, fmt.Sprintf("error creating sqs client: %v", err))

// ACTION
var maxBytes int = 262144
maxSizeSingleMessage := ""
for range maxBytes {
maxSizeSingleMessage += "a"
}
var maxBytes int = 1048576
maxSizeSingleMessage := strings.Repeat("a", maxBytes)
batchesSent, err := client.SendNBatch(context.TODO(), awsCmdQueueURL(), []string{maxSizeSingleMessage, maxSizeSingleMessage})

// ASSERT
Expand Down
Loading