Skip to content

Commit

Permalink
ARCH-414 Remove deprecated keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Namaka committed Nov 15, 2024
1 parent 350f461 commit bed98f6
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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,
]);

Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bed98f6

Please sign in to comment.