Skip to content

Commit febbb20

Browse files
author
Viktor Sevch
committed
MC-23536: CatalogProductListWidgetOrderTest is flaky and fails randomly
1 parent ed34526 commit febbb20

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/CatalogWidget/Block/Product/ProductsList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function createCollection()
339339

340340
$collection = $this->_addProductAttributesAndPrices($collection)
341341
->addStoreFilter()
342-
->addAttributeToSort('created_at', 'desc')
342+
->addAttributeToSort('entity_id', 'desc')
343343
->setPageSize($this->getPageSize())
344344
->setCurPage($this->getRequest()->getParam($this->getData('page_var_name'), 1));
345345

app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public function testCreateCollection($pagerEnable, $productsCount, $productsPerP
314314
$collection->expects($this->once())->method('addAttributeToSelect')->willReturnSelf();
315315
$collection->expects($this->once())->method('addUrlRewrite')->willReturnSelf();
316316
$collection->expects($this->once())->method('addStoreFilter')->willReturnSelf();
317-
$collection->expects($this->once())->method('addAttributeToSort')->with('created_at', 'desc')->willReturnSelf();
317+
$collection->expects($this->once())->method('addAttributeToSort')->with('entity_id', 'desc')->willReturnSelf();
318318
$collection->expects($this->once())->method('setPageSize')->with($expectedPageSize)->willReturnSelf();
319319
$collection->expects($this->once())->method('setCurPage')->willReturnSelf();
320320
$collection->expects($this->once())->method('distinct')->willReturnSelf();

0 commit comments

Comments
 (0)