Skip to content

Commit 56aea2c

Browse files
committed
Avoid race condition in tests with indexers
1 parent 7d56fe4 commit 56aea2c

File tree

43 files changed

+59
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+59
-65
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/AdminEditRelatedBundleProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<argument name="expectedText" value="$$simpleProduct1.name$$"/>
8080
</actionGroup>
8181

82-
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
82+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndexer"/>
8383

8484
<!--See related product in storefront-->
8585
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToStorefront">

app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<requiredEntity createDataKey="createBundleOption"/>
3535
<requiredEntity createDataKey="createSimpleProduct"/>
3636
</createData>
37-
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
37+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndex"/>
3838
</before>
3939
<after>
4040
<!-- Delete Simple Product -->

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
</actionGroup>
4949
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
5050

51-
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
51+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndex"/>
5252
</before>
5353
<after>
5454
<deleteData createDataKey="createBundleProductCreateBundleProduct" stepKey="deleteDynamicBundleProduct"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSelectAndSetBundleOptionsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
9595

9696
<wait stepKey="waitBeforeIndexerAfterBundle" time="60"/>
97-
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexerAfterBundle"/>
97+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndexerAfterBundle"/>
9898

9999
<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
100100
<waitForPageLoad stepKey="waitForStorefront"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<click stepKey="saveProductBundle" selector="{{AdminProductFormActionSection.saveButton}}"/>
7474
<see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/>
7575

76-
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
76+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndexer"/>
7777

7878
<!-- Go to the storefront bundled product page -->
7979
<amOnPage url="/{{BundleProduct.urlKey}}.html" stepKey="visitStoreFrontBundle"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontValidateQuantityBundleProductsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
7373

7474
<wait stepKey="waitBeforeIndexerAfterBundle" time="60"/>
75-
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexerAfterBundle"/>
75+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndexerAfterBundle"/>
7676

7777
<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
7878
<waitForPageLoad stepKey="waitForStorefront"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<argument name="category" value="$$createPreReqCategory$$"/>
3636
<argument name="simpleProduct" value="_defaultProduct"/>
3737
</actionGroup>
38-
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
38+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronIndex"/>
3939
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">
4040
<argument name="category" value="$$createPreReqCategory$$"/>
4141
<argument name="product" value="_defaultProduct"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<argument name="maxMessages" value="{{AdminProductAttributeUpdateConsumerData.messageLimit}}"/>
6363
</actionGroup>
6464

65-
<magentoCLI command="cron:run --group=index" stepKey="runCron"/>
65+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron"/>
6666

6767
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="openFirstProduct"/>
6868
<actionGroup ref="AssertAdminProductPriceUpdatedOnEditPageActionGroup" stepKey="waitForFirstProductToLoad">

app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
<see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSuccessMessage"/>
112112

113113
<!-- Run cron -->
114-
<magentoCLI command="cron:run --group=index" stepKey="runCron"/>
114+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron"/>
115115

116116
<!-- Clear invalidated cache on System>Tools>Cache Management page -->
117117
<amOnPage url="{{AdminCacheManagementPage.url}}" stepKey="onCachePage"/>
@@ -182,7 +182,7 @@
182182
<see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSaveMessage"/>
183183

184184
<!-- Run cron -->
185-
<magentoCLI command="cron:run --group=index" stepKey="runCron2"/>
185+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron2"/>
186186

187187
<!-- Open frontend -->
188188
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="onFrontendPage"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494

9595
<!-- 4. Run cron to reindex -->
9696
<wait time="60" stepKey="waitForChanges"/>
97-
<magentoCLI command="cron:run --group index" stepKey="runCron"/>
98-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice"/>
97+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron"/>
98+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronTwice"/>
9999

100100
<!-- 5. Open category A on Storefront again -->
101101
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadCategoryA"/>
@@ -124,8 +124,8 @@
124124

125125
<!-- 8. Run cron reindex (Ensure that at least one minute passed since last cron run) -->
126126
<wait time="60" stepKey="waitOneMinute"/>
127-
<magentoCLI command="cron:run --group index" stepKey="runCron1"/>
128-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice1"/>
127+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron1"/>
128+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronTwice1"/>
129129

130130
<!-- 9. Open category A on Storefront again -->
131131
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshCategoryAPage"/>
@@ -180,8 +180,8 @@
180180

181181
<!-- 14. Run cron to reindex (Ensure that at least one minute passed since last cron run) -->
182182
<wait time="60" stepKey="waitMinute"/>
183-
<magentoCLI command="cron:run --group index" stepKey="runCron2"/>
184-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice2"/>
183+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron2"/>
184+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronTwice2"/>
185185

186186
<!-- 15. Open category B on Storefront -->
187187
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="onPageCategoryB">
@@ -240,8 +240,8 @@
240240

241241
<!-- 17.14. Run cron to reindex (Ensure that at least one minute passed since last cron run) -->
242242
<wait time="60" stepKey="waitForOneMinute"/>
243-
<magentoCLI command="cron:run --group index" stepKey="runCron3"/>
244-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice3"/>
243+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron3"/>
244+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronTwice3"/>
245245

246246
<!-- 17.15. Open category B on Storefront -->
247247
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openPageCategoryB">
@@ -302,8 +302,8 @@
302302

303303
<!-- 18.14. Run cron to reindex (Ensure that at least one minute passed since last cron run) -->
304304
<wait time="60" stepKey="waitExtraMinute"/>
305-
<magentoCLI command="cron:run --group index" stepKey="runCron4"/>
306-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice4"/>
305+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCron4"/>
306+
<magentoCLI command="cron:run" arguments="--group=index --bootstrap=standaloneProcessStarted=1" stepKey="runCronTwice4"/>
307307

308308
<!-- 18.15. Open category B on Storefront -->
309309
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="navigateToPageCategoryB">

0 commit comments

Comments
 (0)