diff --git a/dev/tests/integration/testsuite/Magento/Framework/MessageQueue/UseCase/WaitAndNotWaitMessagesTest.php b/dev/tests/integration/testsuite/Magento/Framework/MessageQueue/UseCase/WaitAndNotWaitMessagesTest.php index c11004f503c40..e5fed191ea17e 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/MessageQueue/UseCase/WaitAndNotWaitMessagesTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/MessageQueue/UseCase/WaitAndNotWaitMessagesTest.php @@ -66,14 +66,21 @@ protected function setUp(): void */ public function testWaitForMessages() { - $this->assertArrayHasKey('queue', $this->config); - $this->assertArrayHasKey('consumers_wait_for_messages', $this->config['queue']); - $this->assertEquals(1, $this->config['queue']['consumers_wait_for_messages']); + $this->publisherConsumerController->stopConsumers(); + + $config = $this->config; + $config['queue']['consumers_wait_for_messages'] = 1; + $this->writeConfig($config); + + $loadedConfig = $this->loadConfig(); + $this->assertArrayHasKey('queue', $loadedConfig); + $this->assertArrayHasKey('consumers_wait_for_messages', $loadedConfig['queue']); + $this->assertEquals(1, $loadedConfig['queue']['consumers_wait_for_messages']); foreach ($this->messages as $message) { $this->publishMessage($message); } - + $this->publisherConsumerController->startConsumers(); $this->waitForAsynchronousResult(count($this->messages), $this->logFilePath); foreach ($this->messages as $item) {