Skip to content

Commit

Permalink
Set delevery tags on AMQP
Browse files Browse the repository at this point in the history
  • Loading branch information
p-pichet committed Aug 1, 2024
1 parent 0315e5b commit e627cd4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Tests/Functional/AmqpCommonUseCasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public function testProduceAndReceiveOneMessageSentDirectlyToTemporaryQueue()
$queue = $this->amqpContext->createTemporaryQueue();

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(145);

$producer = $this->amqpContext->createProducer();
$producer->send($queue, $message);
Expand All @@ -137,6 +138,7 @@ public function testProduceAndReceiveOneMessageSentDirectlyToTopic()
$this->amqpContext->bind(new AmqpBind($topic, $queue));

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(145);

$producer = $this->amqpContext->createProducer();
$producer->send($topic, $message);
Expand All @@ -158,10 +160,11 @@ public function testConsumerReceiveMessageFromTopicDirectly()
$this->amqpContext->declareTopic($topic);

$consumer = $this->amqpContext->createConsumer($topic);
//guard
// guard
$this->assertNull($consumer->receive(1000));

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(145);

$producer = $this->amqpContext->createProducer();
$producer->send($topic, $message);
Expand All @@ -181,10 +184,11 @@ public function testConsumerReceiveMessageWithZeroTimeout()
$this->amqpContext->declareTopic($topic);

$consumer = $this->amqpContext->createConsumer($topic);
//guard
// guard
$this->assertNull($consumer->receive(1000));

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(145);

$producer = $this->amqpContext->createProducer();
$producer->send($topic, $message);
Expand All @@ -205,6 +209,7 @@ public function testPurgeMessagesFromQueue()
$consumer = $this->amqpContext->createConsumer($queue);

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(145);

$producer = $this->amqpContext->createProducer();
$producer->send($queue, $message);
Expand Down

0 comments on commit e627cd4

Please sign in to comment.