Skip to content

Commit 423f3df

Browse files
committed
MAGE-1134: add scoped waitForTask() calls in multi-store tests
1 parent c0d8114 commit 423f3df

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Test/Integration/Category/MultiStoreCategoriesTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public function testMultiStoreCategoryIndices()
8282
$this->assertEquals(self::BAGS_CATEGORY_NAME_ALT, $bagsCategoryAlt->getName());
8383

8484
$this->categoriesIndexer->execute([self::BAGS_CATEGORY_ID]);
85-
$this->algoliaHelper->waitLastTask();
85+
86+
$this->algoliaHelper->waitLastTask($defaultStore->getId());
87+
$this->algoliaHelper->waitLastTask($fixtureSecondStore->getId());
8688

8789
$this->assertAlgoliaRecordValues(
8890
$this->indexPrefix . 'default_categories',
@@ -106,7 +108,9 @@ public function testMultiStoreCategoryIndices()
106108
);
107109

108110
$this->categoriesIndexer->execute([self::BAGS_CATEGORY_ID]);
109-
$this->algoliaHelper->waitLastTask();
111+
112+
$this->algoliaHelper->waitLastTask($defaultStore->getId());
113+
$this->algoliaHelper->waitLastTask($fixtureSecondStore->getId());
110114

111115
$this->assertNbOfRecordsPerStore(
112116
$defaultStore->getCode(),

Test/Integration/Product/MultiStoreProductsTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ public function testMultiStoreProductIndices()
103103
$this->assertEquals(self::VOYAGE_YOGA_BAG_NAME_ALT, $voyageYogaBagAlt->getName());
104104

105105
$this->productsIndexer->execute([self::VOYAGE_YOGA_BAG_ID]);
106-
$this->algoliaHelper->waitLastTask();
106+
107+
$this->algoliaHelper->waitLastTask($defaultStore->getId());
108+
$this->algoliaHelper->waitLastTask($fixtureSecondStore->getId());
109+
$this->algoliaHelper->waitLastTask($fixtureThirdStore->getId());
107110

108111
$this->assertAlgoliaRecordValues(
109112
$this->indexPrefix . 'default_products',
@@ -129,7 +132,10 @@ public function testMultiStoreProductIndices()
129132
$this->productPriceIndexer->reindexRow(self::VOYAGE_YOGA_BAG_ID);
130133

131134
$this->productsIndexer->execute([self::VOYAGE_YOGA_BAG_ID]);
132-
$this->algoliaHelper->waitLastTask();
135+
136+
$this->algoliaHelper->waitLastTask($defaultStore->getId());
137+
$this->algoliaHelper->waitLastTask($fixtureSecondStore->getId());
138+
$this->algoliaHelper->waitLastTask($fixtureThirdStore->getId());
133139

134140
// default store should have the same number of products
135141
$this->assertNbOfRecordsPerStore(

0 commit comments

Comments
 (0)