Skip to content

Commit fff8f22

Browse files
committed
ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported
1 parent 73f3d24 commit fff8f22

File tree

3 files changed

+7
-27
lines changed

3 files changed

+7
-27
lines changed

dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ protected function setUp(): void
4545
AppIsolation(true),
4646
DataFixture('Magento/Catalog/_files/product_with_options.php'),
4747
DataFixture('Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php'),
48-
DataFixture('Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php'),
4948
]
5049
public function testReindexOfDependentIndexer(): void
5150
{
51+
$indexer = $this->ruleProductProcessor->getIndexer();
52+
$indexer->reindexAll();
53+
$indexer->setScheduled(true);
54+
5255
$product = $this->productRepository->get('simple');
5356
$productId = (int)$product->getId();
5457

@@ -61,10 +64,12 @@ public function testReindexOfDependentIndexer(): void
6164
$product = $this->getProductFromCollection($productId);
6265
$this->assertEquals(9, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue());
6366

64-
$this->ruleProductProcessor->getIndexer()->reindexList([$productId]);
67+
$indexer->reindexList([$productId]);
6568

6669
$product = $this->getProductFromCollection($productId);
6770
$this->assertEquals(90, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue());
71+
72+
$indexer->setScheduled(false);
6873
}
6974

7075
/**

dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php

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

dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php

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

0 commit comments

Comments
 (0)