Skip to content

Commit 7bfb70a

Browse files
committed
Use correct value for WaitTimeSecond
When the ReceiveMessageInput was create it was using `MaxNubmerOfMessages` as the value for WaitTimeSeconds. Just use the correct value out of the config Struct. (fixes #9) Signed-off-by: Jon Whitcraft <jwhitcraft@mac.com>
1 parent 2fc79bf commit 7bfb70a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

worker/worker.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (worker *Worker) Start(ctx context.Context, h Handler) {
8282
AttributeNames: []*string{
8383
aws.String("All"), // Required
8484
},
85-
WaitTimeSeconds: aws.Int64(worker.Config.MaxNumberOfMessage),
85+
WaitTimeSeconds: aws.Int64(worker.Config.WaitTimeSecond),
8686
}
8787

8888
resp, err := worker.SqsClient.ReceiveMessage(params)

worker/worker_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func setupClientSpies(client *mockedSqsClient) {
114114
AttributeNames: []*string{
115115
aws.String("All"),
116116
},
117-
WaitTimeSeconds: aws.Int64(10),
117+
WaitTimeSeconds: aws.Int64(20),
118118
}
119119
client.On("ReceiveMessage", receiveInput).Return()
120120

0 commit comments

Comments
 (0)