Skip to content

Commit a9f7246

Browse files
committed
MC-18327: [backport 2.2] 2.3.2 - Product Flat Data index taking long time to reindex?
1 parent 9196521 commit a9f7246

File tree

3 files changed

+6
-41
lines changed

3 files changed

+6
-41
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/FullTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,11 @@ public function testReindexAll()
7878
* @magentoDbIsolation disabled
7979
* @magentoAppIsolation enabled
8080
* @magentoDataFixture Magento/Catalog/_files/product_simple_multistore.php
81-
* @magentoDataFixture Magento/Catalog/_files/enable_catalog_product_flat_indexer.php
81+
* @magentoConfigFixture current_store catalog/frontend/flat_catalog_product 1
82+
* @magentoConfigFixture fixturestore_store catalog/frontend/flat_catalog_product 1
8283
*/
8384
public function testReindexAllMultipleStores()
8485
{
85-
$this->_state = $this->objectManager->create(State::class);
86-
$this->_processor = $this->objectManager->create(Processor::class);
87-
8886
$this->assertTrue($this->_state->isFlatEnabled());
8987
$this->_processor->reindexAll();
9088

@@ -93,9 +91,10 @@ public function testReindexAllMultipleStores()
9391
/** @var StoreManagerInterface $storeManager */
9492
$storeManager = $this->objectManager->get(StoreManagerInterface::class);
9593
$store = $storeManager->getStore('fixturestore');
94+
$defaultStore = $storeManager->getDefaultStoreView();
9695

9796
$expectedData = [
98-
$storeManager->getDefaultStoreView()->getId() => 'Simple Product One',
97+
$defaultStore->getId() => 'Simple Product One',
9998
$store->getId() => 'StoreTitle',
10099
];
101100

@@ -116,5 +115,7 @@ public function testReindexAllMultipleStores()
116115
'Wrong product name specified per store.'
117116
);
118117
}
118+
119+
$storeManager->setCurrentStore($defaultStore->getId());
119120
}
120121
}

dev/tests/integration/testsuite/Magento/Catalog/_files/enable_catalog_product_flat_indexer.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Catalog/_files/enable_catalog_product_flat_indexer_rollback.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)