From 956ae57e74c6a6461ee3acf1e2bc2554ca79f805 Mon Sep 17 00:00:00 2001 From: Oleksandr Kravchuk Date: Tue, 2 Feb 2021 21:29:05 +0200 Subject: [PATCH] magento/magento2#23540: Queue consumers. Add integration tests coverage. --- .../PoisonPillAppyAfterCommandRunTest.php | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 app/code/Magento/MessageQueue/Test/Integration/PoisonPillAppyAfterCommandRunTest.php diff --git a/app/code/Magento/MessageQueue/Test/Integration/PoisonPillAppyAfterCommandRunTest.php b/app/code/Magento/MessageQueue/Test/Integration/PoisonPillAppyAfterCommandRunTest.php new file mode 100644 index 0000000000000..3157bcb1bc953 --- /dev/null +++ b/app/code/Magento/MessageQueue/Test/Integration/PoisonPillAppyAfterCommandRunTest.php @@ -0,0 +1,56 @@ +poisonPillRead = $objectManager->get(PoisonPillReadInterface::class); + $this->poisonPillCompare = $objectManager->get(PoisonPillCompareInterface::class); + $this->shell = $objectManager->get(Shell::class); + } + + /** + * @throws \Magento\Framework\Exception\LocalizedException + * @covers \Magento\MessageQueue\Setup\Recurring + * + * @magentoDbIsolation disabled + */ + public function testChangeVersion() + { + $version = $this->poisonPillRead->getLatestVersion(); + $this->shell->execute(PHP_BINARY . ' -f %s queue:consumers:restart', [BP . '/bin/magento']); + $this->assertEquals(false, $this->poisonPillCompare->isLatestVersion($version)); + } +}