Skip to content

Commit

Permalink
Change the method for getting the message ID
Browse files Browse the repository at this point in the history
  • Loading branch information
DikoIbragimov committed Dec 7, 2024
1 parent 7069cbb commit e70aba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Unit/QueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Yiisoft\Queue\AMQP\Tests\Support\FileHelper;
use Yiisoft\Queue\Cli\LoopInterface;
use Yiisoft\Queue\Exception\JobFailureException;
use Yiisoft\Queue\Message\IdEnvelope;
use Yiisoft\Queue\Message\JsonMessageSerializer;
use Yiisoft\Queue\Message\Message;
use Yiisoft\Queue\Message\MessageSerializerInterface;
Expand All @@ -41,7 +42,9 @@ public function testStatus(): void

$this->expectException(NotImplementedException::class);
$this->expectExceptionMessage("Status check is not supported by the adapter $adapterClass.");
$adapter->status($message->getId());

$messageId = (string)($message->getMetadata()[IdEnvelope::MESSAGE_ID_KEY] ?? 'null');
$adapter->status($messageId);
}

/**
Expand Down

0 comments on commit e70aba5

Please sign in to comment.