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

fix: VOL-3953 prevent bug with queue service from being overwritten #208

Merged
merged 1 commit into from
Aug 1, 2024
Merged
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
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]);
}
}
Loading