Skip to content

Commit 544410f

Browse files
committed
MQE-2495: config parallel by number of groups
1 parent 3a95153 commit 544410f

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

dev/tests/util/MftfTestCase.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace tests\util;
77

88
use Magento\FunctionalTestingFramework\ObjectManager;
9+
use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler;
10+
use Magento\FunctionalTestingFramework\Suite\SuiteGenerator;
911
use Magento\FunctionalTestingFramework\Test\Handlers\TestObjectHandler;
1012
use Magento\FunctionalTestingFramework\Util\TestGenerator;
1113
use PHPUnit\Framework\TestCase;
@@ -118,5 +120,15 @@ private function clearHandler()
118120
$property = new \ReflectionProperty(ObjectManager::class, 'instance');
119121
$property->setAccessible(true);
120122
$property->setValue(null);
123+
124+
// clear suite generator to force recollection of test data
125+
$property = new \ReflectionProperty(SuiteGenerator::class, 'instance');
126+
$property->setAccessible(true);
127+
$property->setValue(null);
128+
129+
// clear suite object handler to force recollection of test data
130+
$property = new \ReflectionProperty(SuiteObjectHandler::class, 'instance');
131+
$property->setAccessible(true);
132+
$property->setValue(null);
121133
}
122134
}

dev/tests/verification/Tests/SuiteGenerationTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ public function tearDown(): void
490490
$fileSystem->remove(
491491
self::CONFIG_YML_FILE
492492
);
493+
494+
$property = new \ReflectionProperty(DirSetupUtil::class, "DIR_CONTEXT");
495+
$property->setAccessible(true);
496+
$property->setValue([]);
493497
}
494498

495499
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ public function getTestsGroupedByFixedGroupCount($suiteConfiguration, $testNameT
122122
/**
123123
* Return suite's group counts from a group total
124124
*
125-
* @param $suiteNameToSize
126-
* @param $testNameToSize
127-
* @param $groupTotal
125+
* @param array $suiteNameToSize
126+
* @param array $testNameToSize
127+
* @param integer $groupTotal
128128
* @return array
129129
*/
130130
private function getSuiteGroupCounts($suiteNameToSize, $testNameToSize, $groupTotal)

0 commit comments

Comments
 (0)