Skip to content

Commit 8d2b2f5

Browse files
authored
Merge pull request #259 from magento/2.3.9
Merge MFTF 2.3.9 into develop
2 parents 1fddfb6 + 96842ba commit 8d2b2f5

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Magento Functional Testing Framework Changelog
22
================================================
3+
2.3.9
4+
-----
5+
### Fixes
6+
* Logic for parallel execution were updated to split default tests and suites from running in one group.
37

48
2.3.8
59
-----

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "2.3.8",
5+
"version": "2.3.9",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,14 @@ public function testSortWithSuites()
9898
$actualResult = $testSorter->getTestsGroupedBySize($sampleSuiteArray, $sampleTestArray, 500);
9999

100100
// verify the resulting groups
101-
$this->assertCount(4, $actualResult);
101+
$this->assertCount(5, $actualResult);
102102

103103
$expectedResults = [
104-
1 => ['test3'],
105-
2 => ['test2','test5', 'test4'],
106-
3 => ['mockSuite1_0', 'test1'],
107-
4 => ['mockSuite1_1']
104+
1 => ['mockSuite1_0'],
105+
2 => ['mockSuite1_1'],
106+
3 => ['test3'],
107+
4 => ['test2','test5', 'test4'],
108+
5 => ['test1'],
108109
];
109110

110111
foreach ($actualResult as $groupNum => $group) {

src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,18 @@ public function getTestsGroupedBySize($suiteConfiguration, $testNameToSize, $tim
4747
$testGroups = [];
4848
$splitSuiteNamesToTests = $this->createGroupsWithinSuites($suiteConfiguration, $time);
4949
$splitSuiteNamesToSize = $this->getSuiteToSize($splitSuiteNamesToTests);
50-
$entriesForGeneration = array_merge($testNameToSize, $splitSuiteNamesToSize);
51-
arsort($entriesForGeneration);
50+
arsort($testNameToSize);
51+
arsort($splitSuiteNamesToSize);
5252

53-
$testNameToSizeForUse = $entriesForGeneration;
53+
$testNameToSizeForUse = $testNameToSize;
5454
$nodeNumber = 1;
55-
foreach ($entriesForGeneration as $testName => $testSize) {
55+
56+
foreach ($splitSuiteNamesToSize as $testName => $testSize) {
57+
$testGroups[$nodeNumber] = [$testName => $testSize];
58+
$nodeNumber++;
59+
}
60+
61+
foreach ($testNameToSize as $testName => $testSize) {
5662
if (!array_key_exists($testName, $testNameToSizeForUse)) {
5763
// skip tests which have already been added to a group
5864
continue;

0 commit comments

Comments
 (0)