File tree Expand file tree Collapse file tree 2 files changed +2
-20
lines changed
Model/Indexer/Product/Price
Test/Unit/Model/Indexer/Product/Price/Action Expand file tree Collapse file tree 2 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -408,14 +408,11 @@ function ($type) use ($productsTypes) {
408408 foreach ($ this ->dimensionCollectionFactory ->create () as $ dimensions ) {
409409 $ this ->tableMaintainer ->createMainTmpTable ($ dimensions );
410410 $ temporaryTable = $ this ->tableMaintainer ->getMainTmpTable ($ dimensions );
411+ $ this ->_emptyTable ($ temporaryTable );
411412 $ indexer ->executeByDimensions ($ dimensions , \SplFixedArray::fromArray ($ entityIds , false ));
412413 $ mainTable = $ this ->tableMaintainer ->getMainTableByDimensions ($ dimensions );
413414 $ this ->_insertFromTable ($ temporaryTable , $ mainTable );
414415 $ this ->deleteOutdatedData ($ entityIds , $ temporaryTable , $ mainTable );
415- // phpcs:ignore Magento2.SQL.RawQuery.FoundRawSql
416- $ this ->getConnection ()->query (
417- 'TRUNCATE TABLE ' . $ this ->getConnection ()->quoteIdentifier ($ temporaryTable )
418- );
419416 }
420417 } else {
421418 // handle 3d-party indexers for backward compatibility
Original file line number Diff line number Diff line change @@ -144,7 +144,6 @@ public function testBatchProcessing()
144144 $ adapter = $ this ->createMock (AdapterInterface::class);
145145 $ adapter ->method ('select ' )->willReturn ($ select );
146146 $ adapter ->method ('describeTable ' )->willReturn ([]);
147- $ adapter ->expects ($ this ->exactly (4 ))->method ('dropTable ' );
148147 $ this ->defaultIndexerResource ->method ('getConnection ' )->willReturn ($ adapter );
149148 $ adapter ->method ('fetchAll ' )->with ($ select )->willReturn ([]);
150149
@@ -194,21 +193,7 @@ public function testBatchProcessing()
194193 ->method ('getPrimaryKeyName ' )
195194 ->willReturn ('entity_id ' );
196195
197- $ actionRows = new Rows (
198- $ this ->config ,
199- $ this ->storeManager ,
200- $ this ->currencyFactory ,
201- $ this ->localeDate ,
202- $ this ->dateTime ,
203- $ this ->catalogProductType ,
204- $ this ->indexerPriceFactory ,
205- $ this ->defaultIndexerResource ,
206- $ this ->tierPriceIndexResource ,
207- $ this ->dimensionCollectionFactory ,
208- $ this ->tableMaintainer ,
209- 2
210- );
211- $ actionRows ->execute ($ ids );
196+ $ this ->actionRows ->execute ($ ids );
212197 }
213198
214199 public function testDeletedProductsBatchProcessing ()
You can’t perform that action at this time.
0 commit comments