Skip to content

Commit 93f4e3a

Browse files
committed
B2B:2037:[AWS S3] [Integration Tests]: Investigate Test Failures in MediaGallerySynchronization & MediaGallerySynchronizationMetadata modules
- Added tear down error fixes
1 parent f25e498 commit 93f4e3a

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

app/code/Magento/MediaGallerySynchronization/Test/Integration/Model/SynchronizeFilesTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public function testExecute(
8383

8484
$this->assertEquals($title, pathinfo($loadedAsset->getTitle(), PATHINFO_FILENAME));
8585
$this->assertEquals($source, $loadedAsset->getSource());
86+
$this->driver->deleteFile($modifiableFilePath);
8687
}
8788

8889
/**
@@ -100,12 +101,4 @@ public function filesProvider(): array
100101
]
101102
];
102103
}
103-
104-
/**
105-
* @inheritdoc
106-
*/
107-
public function tearDown(): void
108-
{
109-
$this->mediaDirectory->getDriver()->deleteFile($this->mediaDirectory->getAbsolutePath());
110-
}
111104
}

dev/tests/integration/testsuite/Magento/MediaGallerySynchronizationMetadata/Model/SynchronizeFilesTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function testExecute(
9595
$this->assertEquals($title, pathinfo($loadedAssets->getTitle(), PATHINFO_FILENAME));
9696
$this->assertEquals($description, $loadedAssets->getDescription());
9797
$this->assertEquals($keywords, $loadedKeywords);
98+
$this->driver->deleteFile($modifiableFilePath);
9899
}
99100

100101
/**
@@ -146,12 +147,4 @@ function (KeywordInterface $keyword) {
146147
$keywords
147148
);
148149
}
149-
150-
/**
151-
* @inheritdoc
152-
*/
153-
public function tearDown(): void
154-
{
155-
$this->mediaDirectory->getDriver()->deleteFile($this->mediaDirectory->getAbsolutePath());
156-
}
157150
}

0 commit comments

Comments
 (0)