Skip to content

Commit

Permalink
Merge remote-tracking branch '37018/catalog-mftf-cron-run-reliability…
Browse files Browse the repository at this point in the history
…' into comm_prs_247beta3_dec
  • Loading branch information
Indraniks committed Feb 28, 2024
2 parents ef65641 + 95c1b1d commit e444de6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<argument name="consumerName" value="{{AdminProductAttributeUpdateConsumerData.consumerName}}"/>
<argument name="maxMessages" value="{{AdminProductAttributeUpdateConsumerData.messageLimit}}"/>
</actionGroup>
<magentoCron stepKey="runCron"/>
<magentoCron groups="default" stepKey="runCron"/>

<actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openProductForEdit"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@
<argument name="productName" value="{{_defaultProduct.name}}"/>
</actionGroup>

<!-- Run cron -->
<magentoCron stepKey="runCron" />
<magentoCron stepKey="runCronTwice" />
<!-- We need the 'indexer_update_all_views' job to run. This is the best
way we can make that happen, but there is no guarantee that there is
such a job already scheduled in the queue. -->
<magentoCron groups="index" stepKey="runCron" />
<comment userInput="We need the indexer_update_all_views job to run" stepKey="runCronTwice"/>

<!-- Check product is present in category after cron run -->
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
</actionGroup>
<magentoCron stepKey="runCronAfterPlacingOrder"/>
<magentoCron groups="default" stepKey="runCronAfterPlacingOrder"/>

<!-- Get Order id -->
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
Expand All @@ -114,7 +114,7 @@
<!-- Cancel order -->
<actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelOrder"/>
<waitForPageLoad stepKey="waitForOrderDetailsToLoad"/>
<magentoCron stepKey="runCronAfterCancelingOrder"/>
<magentoCron groups="default" stepKey="runCronAfterCancelingOrder"/>

<!-- Open My Account Page from Customer dropdown -->
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public function render($command, array $arguments = [])

return $this->osInfo->isWindows() ?
'start /B "magento background task" ' . $command
: str_replace('2>&1', '> /dev/null &', $command);
: str_replace('2>&1', '2>/dev/null >/dev/null &', $command);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function commandPerOsTypeDataProvider()
{
return [
'windows' => [true, 'start /B "magento background task" ' . $this->testCommand . ' 2>&1'],
'unix' => [false, $this->testCommand . ' > /dev/null &'],
'unix' => [false, $this->testCommand . ' 2>/dev/null >/dev/null &'],
];
}
}

0 comments on commit e444de6

Please sign in to comment.