Skip to content

Commit caecffe

Browse files
author
OlgaVasyltsun
committed
MC-34482: MFTF tests causing high load
1 parent 5139f7d commit caecffe

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
<requiredEntity createDataKey="createAttributeSet"/>
2929
</createData>
3030

31-
<magentoCron stepKey="runCron"/>
31+
<magentoCLI command="cron:run" arguments="--group index" stepKey="cronRun"/>
32+
<magentoCLI command="cron:run" arguments="--group index" stepKey="cronRunToStartReindex"/>
3233
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
3334
</before>
3435
<after>
@@ -48,8 +49,10 @@
4849
<!-- Export created below products -->
4950
<actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
5051

51-
<magentoCron stepKey="runCronIndex" groups="index"/>
52-
52+
<!-- Start message queue for export consumer -->
53+
<actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
54+
<reloadPage stepKey="pageReload" />
55+
<waitForPageLoad stepKey="waitForPageLoaded" />
5356
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
5457

5558
<!-- Download product -->
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminStartMessageQueueConsumerActionGroup">
12+
<annotations>
13+
<description>Starts message queue for specific consumer.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
17+
</arguments>
18+
19+
<magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}}" stepKey="startMessageQueue"/>
20+
<wait time="30" stepKey="waitForQueueStarting"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
9+
<entity name="AdminExportMessageConsumerData">
10+
<data key="consumer_name">exportProcessor</data>
11+
<data key="message_limit">100</data>
12+
</entity>
13+
</entities>

0 commit comments

Comments
 (0)