Skip to content

Commit 110a361

Browse files
ENGCOM-8529: remove clearing cache for integration tests #31053
2 parents ed5d72a + 0b3e124 commit 110a361

File tree

25 files changed

+4
-42
lines changed

25 files changed

+4
-42
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ private function compareFilterNames(array $a, array $b)
173173
*/
174174
public function testLayeredNavigationForConfigurableProducts()
175175
{
176-
CacheCleaner::cleanAll();
177176
$attributeCode = 'test_configurable';
178177

179178
/** @var Config $eavConfig */
@@ -277,7 +276,7 @@ private function getQueryProductsWithArrayOfCustomAttributes($attributeCode, $fi
277276
*/
278277
public function testFilterProductsByDropDownCustomAttribute()
279278
{
280-
CacheCleaner::cleanAll();
279+
CacheCleaner::clean(['eav']);
281280
$attributeCode = 'second_test_configurable';
282281
$optionValue = $this->getDefaultAttributeOptionValue($attributeCode);
283282
$query = <<<QUERY

dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogUrlRewrite/UrlResolverTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,10 @@ public function testRedirectsAndCustomInput()
219219
$urlRewriteModel->setRedirectType('301');
220220
$urlRewriteModel->setId($urlRewriteModel->getId());
221221
$urlRewriteModel->save();
222-
223-
ObjectManager::getInstance()->get(\Magento\TestFramework\Helper\CacheCleaner::class)->cleanAll();
224222
//modifying query by adding spaces to avoid getting cached values.
225223
$this->queryUrlAndAssertResponse(
226224
(int) $product->getEntityId(),
227-
$customUrl,
225+
$customUrl . ' ',
228226
$actualUrls->getRequestPath(),
229227
strtoupper($actualUrls->getEntityType()),
230228
301

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ public function testSaveActionAndDuplicateWithUrlPathAttribute()
138138
$urlPathAttribute = $product->getCustomAttribute('url_path');
139139
$this->assertEquals($urlPathAttribute->getValue(), $product->getSku());
140140

141-
// clean cache
142-
CacheCleaner::cleanAll();
143-
144141
// dispatch Save&Duplicate action and check it
145142
$this->assertSaveAndDuplicateAction($product);
146143
}

dev/tests/integration/testsuite/Magento/Catalog/Model/ConfigTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ protected function setUp(): void
3131
public function testGetEntityAttributeCodes()
3232
{
3333
$entityType = 'catalog_product';
34-
CacheCleaner::cleanAll();
3534
$this->assertEquals(
3635
$this->config->getEntityAttributeCodes($entityType),
3736
$this->config->getEntityAttributeCodes($entityType)
@@ -42,7 +41,6 @@ public function testGetAttribute()
4241
{
4342
$entityType = 'catalog_product';
4443
$attributeCode = 'color';
45-
CacheCleaner::cleanAll();
4644
$this->assertEquals(
4745
$this->config->getAttribute($entityType, $attributeCode),
4846
$this->config->getAttribute($entityType, $attributeCode)
@@ -52,7 +50,6 @@ public function testGetAttribute()
5250
public function testGetEntityType()
5351
{
5452
$entityType = 'catalog_product';
55-
CacheCleaner::cleanAll();
5653
$this->assertEquals(
5754
$this->config->getEntityType($entityType),
5855
$this->config->getEntityType($entityType)

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Source/CountryofmanufactureTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ protected function setUp(): void
2424

2525
public function testGetAllOptions()
2626
{
27-
CacheCleaner::cleanAll();
2827
$allOptions = $this->model->getAllOptions();
2928
$cachedAllOptions = $this->model->getAllOptions();
3029
$this->assertEquals($allOptions, $cachedAllOptions);

dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Attribute/Entity/AttributeTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class AttributeTest extends \PHPUnit\Framework\TestCase
5252
*/
5353
protected function setUp(): void
5454
{
55-
CacheCleaner::cleanAll();
5655
$this->objectManager = Bootstrap::getObjectManager();
5756
$this->productRepository = $this->objectManager->get(ProductRepositoryInterface::class);
5857
$this->attributeRepository = $this->objectManager->get(AttributeRepository::class);

dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function testModifyMeta()
3939
{
4040
$inputMeta = include __DIR__ . '/_files/input_meta_for_categories.php';
4141
$expectedCategories = include __DIR__ . '/_files/expected_categories.php';
42-
CacheCleaner::cleanAll();
4342
$this->assertCategoriesInMeta($expectedCategories, $this->object->modifyMeta($inputMeta));
4443
// Verify cached data
4544
$this->assertCategoriesInMeta($expectedCategories, $this->object->modifyMeta($inputMeta));

dev/tests/integration/testsuite/Magento/Customer/Model/AddressMetadataTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class AddressMetadataTest extends \PHPUnit\Framework\TestCase
1919

2020
protected function setUp(): void
2121
{
22-
CacheCleaner::cleanAll();
2322
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
2423
$objectManager->configure(
2524
[

dev/tests/integration/testsuite/Magento/Customer/Model/CustomerMetadataTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class CustomerMetadataTest extends \PHPUnit\Framework\TestCase
2929

3030
protected function setUp(): void
3131
{
32-
CacheCleaner::cleanAll();
3332
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
3433
$objectManager->configure(
3534
[\Magento\Framework\Api\ExtensionAttribute\Config\Reader::class => [

dev/tests/integration/testsuite/Magento/Directory/Block/DataTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ protected function setUp(): void
2222

2323
public function testGetCountryHtmlSelect()
2424
{
25-
CacheCleaner::cleanAll();
2625
$result = $this->block->getCountryHtmlSelect();
2726
$resultTwo = $this->block->getCountryHtmlSelect();
2827
$this->assertEquals($result, $resultTwo);
2928
}
3029

3130
public function testGetRegionHtmlSelect()
3231
{
33-
CacheCleaner::cleanAll();
3432
$result = $this->block->getRegionHtmlSelect();
3533
$resultTwo = $this->block->getRegionHtmlSelect();
3634
$this->assertEquals($result, $resultTwo);

0 commit comments

Comments
 (0)