Skip to content

Commit 77dc419

Browse files
committed
MC-39923: Stabilize Integration Tests (PageBuilder)
- ProductTest::testImportExport with data set "simple-product" fails on Jenkins magento-commerce/magento2ce@bc1c088
1 parent f14a28c commit 77dc419

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ abstract class AbstractProductExportImportTestCase extends \PHPUnit\Framework\Te
6868
*/
6969
private $writer;
7070

71+
/**
72+
* @var string
73+
*/
74+
private $csvFile;
75+
7176
/**
7277
* @inheritdoc
7378
*/
@@ -87,6 +92,11 @@ protected function setUp(): void
8792
protected function tearDown(): void
8893
{
8994
$this->executeFixtures($this->fixtures, true);
95+
96+
if ($this->csvFile !== null) {
97+
$directoryWrite = $this->fileSystem->getDirectoryWrite(DirectoryList::VAR_DIR);
98+
$directoryWrite->delete($this->csvFile);
99+
}
90100
}
91101

92102
/**
@@ -104,6 +114,7 @@ protected function tearDown(): void
104114
*/
105115
public function testImportExport(array $fixtures, array $skus, array $skippedAttributes = []): void
106116
{
117+
$this->csvFile = null;
107118
$this->fixtures = $fixtures;
108119
$this->executeFixtures($fixtures);
109120
$this->modifyData($skus);
@@ -378,6 +389,7 @@ protected function executeImportReplaceTest(
378389
private function exportProducts(\Magento\CatalogImportExport\Model\Export\Product $exportProduct = null)
379390
{
380391
$csvfile = uniqid('importexport_') . '.csv';
392+
$this->csvFile = $csvfile;
381393

382394
$exportProduct = $exportProduct ?: $this->objectManager->create(
383395
\Magento\CatalogImportExport\Model\Export\Product::class

0 commit comments

Comments
 (0)