diff --git a/InventoryApi/Test/_files/stocks_rollback.php b/InventoryApi/Test/_files/stocks_rollback.php index fc83df5d96f5..ac62d5f61320 100644 --- a/InventoryApi/Test/_files/stocks_rollback.php +++ b/InventoryApi/Test/_files/stocks_rollback.php @@ -11,9 +11,11 @@ use Magento\InventorySalesApi\Api\Data\SalesChannelInterfaceFactory; use Magento\TestFramework\Helper\Bootstrap; +$stockIds = [10, 20, 30]; + /** @var StockRepositoryInterface $stockRepository */ $stockRepository = Bootstrap::getObjectManager()->get(StockRepositoryInterface::class); -foreach ([10, 20, 30] as $stockId) { +foreach ($stockIds as $stockId) { try { //Unassign sales channels from stocks in order to delete given stocks. $stockRepository = Bootstrap::getObjectManager()->get(StockRepositoryInterface::class); @@ -31,4 +33,10 @@ } $removeIndexData = Bootstrap::getObjectManager()->get(RemoveIndexData::class); -$removeIndexData->execute([10, 20, 30]); +foreach ($stockIds as $stockId) { + try { + $removeIndexData->execute([$stockId]); + } catch (\Zend_Db_Exception $e) { + //Index already removed + } +} diff --git a/InventoryLowQuantityNotification/Test/Integration/Model/RssFeedTest.php b/InventoryLowQuantityNotification/Test/Integration/Model/RssFeedTest.php index 43d52fa2fd1c..217a322e25c8 100644 --- a/InventoryLowQuantityNotification/Test/Integration/Model/RssFeedTest.php +++ b/InventoryLowQuantityNotification/Test/Integration/Model/RssFeedTest.php @@ -17,6 +17,7 @@ * Test getRssData with different configuration on multi source inventory. * * @see https://app.hiptest.com/projects/69435/test-plan/folders/446482/scenarios/1651852 + * @magentoDbIsolation disabled */ class RssFeedTest extends TestCase {