Skip to content

Commit

Permalink
Merge pull request #13 from trandangtri/hotfix/wrong-attribute
Browse files Browse the repository at this point in the history
Wrong the name of attribute in receiving message
  • Loading branch information
trandangtri authored Oct 9, 2017
2 parents 3471c33 + 43b2201 commit 06411f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Service/BaseQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function receiveMessage(int $limit = 1)
'MaxNumberOfMessages' => $limit,
'MessageAttributeNames' => ['All'],
'QueueUrl' => $this->queueUrl,
'WaitTimeSeconds' => $this->attributes['receive_message_wait_time_seconds'] ?? 0,
'WaitTimeSeconds' => $this->attributes['ReceiveMessageWaitTimeSeconds'] ?? 0,
]);

$messages = $result->get('Messages') ?? [];
Expand Down
4 changes: 2 additions & 2 deletions Tests/Unit/Service/BaseQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function testReceiveMessage()
{
$limit = random_int(1, 10);
$queueUrl = 'queue-url';
$queueAttr = ['receive_message_wait_time_seconds' => random_int(1, 10)];
$queueAttr = ['ReceiveMessageWaitTimeSeconds' => random_int(1, 10)];
$expected = [
[
'MessageId' => 'my-message-id',
Expand All @@ -175,7 +175,7 @@ public function testReceiveMessage()
'MaxNumberOfMessages' => $limit,
'MessageAttributeNames' => ['All'],
'QueueUrl' => $queueUrl,
'WaitTimeSeconds' => $queueAttr['receive_message_wait_time_seconds'],
'WaitTimeSeconds' => $queueAttr['ReceiveMessageWaitTimeSeconds'],
])
->willReturn($this->getAwsResult(['Messages' => $expected]));

Expand Down

0 comments on commit 06411f0

Please sign in to comment.