From 7bea14d0719930dd3df0041fb50eb4a25ca37611 Mon Sep 17 00:00:00 2001 From: vvatanabe Date: Sun, 3 Dec 2023 10:10:08 +0900 Subject: [PATCH] feat: change DefaultVisibilityTimeoutInSeconds to 30 seconds --- client.go | 2 +- client_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 04a6537..42acdb0 100644 --- a/client.go +++ b/client.go @@ -17,7 +17,7 @@ const ( DefaultTableName = "dynamo-mq-table" DefaultQueueingIndexName = "dynamo-mq-index-queue_type-queue_add_timestamp" DefaultRetryMaxAttempts = 10 - DefaultVisibilityTimeoutInSeconds = 60 + DefaultVisibilityTimeoutInSeconds = 30 DefaultMaxListMessages = 10 DefaultQueryLimit = 250 ) diff --git a/client_test.go b/client_test.go index b7db7e1..6430533 100644 --- a/client_test.go +++ b/client_test.go @@ -288,7 +288,7 @@ func TestDynamoMQClientReceiveMessage(t *testing.T) { name: "should return EmptyQueueError when exists message but visibility timeout is not expired", setup: NewSetupFunc(newPutRequestWithProcessingItem("B-202", test.DefaultTestDate)), sdkClock: mock.Clock{ - T: test.DefaultTestDate.Add(59 * time.Second), + T: test.DefaultTestDate.Add(29 * time.Second), }, want: nil, wantErr: &dynamomq.EmptyQueueError{},