Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
fix: VOL-3953 prevent bug with queue service from being overwritten (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilindsay authored Aug 1, 2024
1 parent f5f857b commit e4c0100
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 3 additions & 9 deletions module/Queue/src/Service/QueueServiceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,17 @@ trait QueueServiceTrait
*/
public function setMessageBuilderService(MessageBuilder $messageBuilderService): void
{
if ($this->messageBuilderService === null) {
$this->messageBuilderService = $messageBuilderService;
}
$this->messageBuilderService = $messageBuilderService;
}

public function setQueueService(Queue $queueService): void
{
if ($this->queueService === null) {
$this->queueService = $queueService;
}
$this->queueService = $queueService;
}

public function setQueueConfig(array $config): void
{
if ($this->queueConfig === null) {
$this->queueConfig = $config;
}
$this->queueConfig = $config;
}

protected function getQueueUrlKey($messageType): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,5 +470,6 @@ protected function setupMocks(int $maxMessages = 100): void
$this->s3Client->shouldReceive('getObject')->andReturn(new \Aws\Result(['Body' => '']));

$this->sut->__invoke($sm, TransXChangeConsumer::class);
$this->sut->setQueueService($this->mockedSmServices[Queue::class]);
}
}

0 comments on commit e4c0100

Please sign in to comment.