From bed98f6d1a75e79933e2fdd091028b897ef1d98f Mon Sep 17 00:00:00 2001 From: Oleg Namaka Date: Fri, 15 Nov 2024 12:11:00 -0600 Subject: [PATCH] ARCH-414 Remove deprecated keys --- .../Transport/AmqpExtIntegrationTest.php | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php index cfa93698bacf5..6b26437142259 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php @@ -144,9 +144,16 @@ public function testRetryAffectsOnlyOriginalQueue() 'default_publish_routing_key' => 'topic_routing_key', ], 'queues' => [ - 'A' => ['binding_keys' => ['topic_routing_key']], - 'B' => ['binding_keys' => ['topic_routing_key']], - ], + 'A' => ['bindings' => [ + "binding1" => ['key' => "name1", "arguments" => ['arg1' => 'val1', 'arg2' => 'val2']], + "binding2" => ['key' => "name2", "arguments" => ['arg3' => 'val3', 'arg4' => 'val4']] + ]], + + 'B' => ['bindings' => [ + "binding1" => ['key' => "name3", "arguments" => ['arg1' => 'val1', 'arg2' => 'val2']], + "binding2" => ['key' => "name4", "arguments" => ['arg3' => 'val3', 'arg4' => 'val4']] + ]], + ] ]); $connection->setup(); $connection->purgeQueues(); @@ -185,9 +192,9 @@ public function testItReceivesSignals() $sender->send(new Envelope(new DummyMessage('Hello'))); $amqpReadTimeout = 30; - $dsn = getenv('MESSENGER_AMQP_DSN').'?read_timeout='.$amqpReadTimeout; - $process = new PhpProcess(file_get_contents(__DIR__.'/../Fixtures/long_receiver.php'), null, [ - 'COMPONENT_ROOT' => __DIR__.'/../../', + $dsn = getenv('MESSENGER_AMQP_DSN') . '?read_timeout=' . $amqpReadTimeout; + $process = new PhpProcess(file_get_contents(__DIR__ . '/../Fixtures/long_receiver.php'), null, [ + 'COMPONENT_ROOT' => __DIR__ . '/../../', 'DSN' => $dsn, ]); @@ -211,7 +218,7 @@ public function testItReceivesSignals() // make sure the process exited, after consuming only the 1 message $this->assertFalse($process->isRunning()); $this->assertLessThan($amqpReadTimeout, microtime(true) - $signalTime); - $this->assertSame($expectedOutput.<<<'TXT' + $this->assertSame($expectedOutput . <<<'TXT' Get envelope with message: Symfony\Component\Messenger\Bridge\Amqp\Tests\Fixtures\DummyMessage with stamps: [ "Symfony\\Component\\Messenger\\Stamp\\SerializedMessageStamp", @@ -256,7 +263,7 @@ private function waitForOutput(Process $process, string $output, $timeoutInSecon usleep(100 * 1000); // 100ms } - throw new \RuntimeException('Expected output never arrived. Got "'.$process->getOutput().'" instead.'); + throw new \RuntimeException('Expected output never arrived. Got "' . $process->getOutput() . '" instead.'); } private function createSerializer(): SerializerInterface