Skip to content

Commit 2f5490f

Browse files
committed
MC-21520: Adapt EE and B2B integration tests to elasticsearch
* Fixed FullTest::testReindexAll
1 parent 0714971 commit 2f5490f

File tree

1 file changed

+18
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Magento\Catalog\Model\Indexer\Product\Flat\Processor;
1212
use Magento\Catalog\Model\Indexer\Product\Flat\State;
1313
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory;
14+
use Magento\CatalogSearch\Model\Indexer\Fulltext;
15+
use Magento\Framework\Indexer\IndexerRegistry;
1416
use Magento\Store\Model\StoreManagerInterface;
1517
use Magento\TestFramework\Helper\Bootstrap;
1618
use Magento\TestFramework\ObjectManager;
@@ -35,6 +37,22 @@ class FullTest extends \Magento\TestFramework\Indexer\TestCase
3537
*/
3638
private $objectManager;
3739

40+
/**
41+
* @inheritdoc
42+
*/
43+
public static function setUpBeforeClass()
44+
{
45+
/*
46+
* Due to insufficient search engine isolation for Elasticsearch, this class must explicitly perform
47+
* a fulltext reindex prior to running its tests.
48+
*
49+
* This should be removed upon completing MC-19455.
50+
*/
51+
$indexRegistry = Bootstrap::getObjectManager()->get(IndexerRegistry::class);
52+
$fulltextIndexer = $indexRegistry->get(Fulltext::INDEXER_ID);
53+
$fulltextIndexer->reindexAll();
54+
}
55+
3856
/**
3957
* @inheritdoc
4058
*/

0 commit comments

Comments
 (0)