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)); + } +}