Skip to content

Commit 2b94c16

Browse files
committed
AC-7385: Integration tests failure in SourcesTest during PR processing
1 parent 3b2f28e commit 2b94c16

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

InventoryImportExport/Test/Integration/Model/Import/ProductTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Magento\ImportExport\Model\Import;
2323
use Magento\ImportExport\Model\Import\Source\Csv;
2424
use Magento\ImportExport\Model\Import\Source\CsvFactory;
25+
use Magento\ImportExport\Model\ResourceModel\Import\Data;
2526
use Magento\InventoryApi\Api\Data\SourceItemInterface;
2627
use Magento\InventoryApi\Api\Data\SourceItemSearchResultsInterface;
2728
use Magento\InventoryApi\Api\SourceItemRepositoryInterface;
@@ -316,6 +317,14 @@ protected function tearDown(): void
316317
// product already deleted
317318
}
318319
}
320+
321+
/** @var Data $dataSourceModel */
322+
$dataSourceModel = $objectManager->create(Data::class);
323+
try {
324+
$dataSourceModel->cleanBunches();
325+
} catch (\Exception $e) {
326+
// nothing to clean
327+
}
319328
$registry->unregister('isSecureArea');
320329
$registry->register('isSecureArea', false);
321330
}

0 commit comments

Comments
 (0)