Issue #3467391 by catch, smustgrave: Reduce CPU requirement and concurrency for unit tests

merge-requests/8607/head
nod_ 2024-08-13 10:28:12 +02:00
parent ef97485d5b
commit 52dc1d7609
No known key found for this signature in database
GPG Key ID: 76624892606FA197
17 changed files with 19 additions and 2 deletions

View File

@ -204,7 +204,8 @@ variables:
- <<: *with-database - <<: *with-database
variables: variables:
TESTSUITE: PHPUnit-Unit TESTSUITE: PHPUnit-Unit
KUBERNETES_CPU_REQUEST: "16" KUBERNETES_CPU_REQUEST: "1"
CONCURRENCY: 6
'✅️ PHPStan Tests': '✅️ PHPStan Tests':
<<: [ *default-job-settings ] <<: [ *default-job-settings ]

View File

@ -14,6 +14,7 @@ use Drupal\Tests\UnitTestCase;
* *
* @coversDefaultClass \Drupal\phpass\Password\PhpassHashedPassword * @coversDefaultClass \Drupal\phpass\Password\PhpassHashedPassword
* @group phpass * @group phpass
* @group #slow
*/ */
class PasswordVerifyTest extends UnitTestCase { class PasswordVerifyTest extends UnitTestCase {

View File

@ -8,8 +8,9 @@
<exclude-pattern>*/node_modules/*</exclude-pattern> <exclude-pattern>*/node_modules/*</exclude-pattern>
<!--Exclude third party code.--> <!--Exclude third party code.-->
<exclude-pattern>./assets/vendor/*</exclude-pattern> <exclude-pattern>./assets/vendor/*</exclude-pattern>
<!--Exclude the PHPStan baseline from coding standards.--> <!--Exclude the PHPStan baseline and temp dir from coding standards.-->
<exclude-pattern>./core/.phpstan-baseline.php</exclude-pattern> <exclude-pattern>./core/.phpstan-baseline.php</exclude-pattern>
<exclude-pattern>./core/phpstan-tmp/*</exclude-pattern>
<!-- Exclude third-party code maintained within core that does not follow our standards. --> <!-- Exclude third-party code maintained within core that does not follow our standards. -->
<!-- @todo This rule may be removed when https://www.drupal.org/node/1848264 is resolved. --> <!-- @todo This rule may be removed when https://www.drupal.org/node/1848264 is resolved. -->
<exclude-pattern>./core/lib/Drupal/Component/Diff/</exclude-pattern> <exclude-pattern>./core/lib/Drupal/Component/Diff/</exclude-pattern>

View File

@ -12,6 +12,7 @@ use PHPUnit\Framework\TestCase;
* *
* @coversDefaultClass \Drupal\Component\Datetime\Time * @coversDefaultClass \Drupal\Component\Datetime\Time
* @group Datetime * @group Datetime
* @group #slow
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */

View File

@ -10,6 +10,7 @@ use PHPUnit\Framework\TestCase;
/** /**
* @coversDefaultClass \Drupal\Component\Utility\Rectangle * @coversDefaultClass \Drupal\Component\Utility\Rectangle
* @group Image * @group Image
* @group #slow
*/ */
class RectangleTest extends TestCase { class RectangleTest extends TestCase {

View File

@ -9,6 +9,7 @@ use PHPUnit\Framework\TestCase;
/** /**
* @group Utility * @group Utility
* @group #slow
* *
* @coversDefaultClass \Drupal\Component\Utility\UrlHelper * @coversDefaultClass \Drupal\Component\Utility\UrlHelper
*/ */

View File

@ -23,6 +23,7 @@ use PHPUnit\Framework\TestCase;
* CVE-2006-1226 (= rev. 1.112?), CVE-2008-0273, CVE-2008-3740. * CVE-2006-1226 (= rev. 1.112?), CVE-2008-0273, CVE-2008-3740.
* *
* @group Utility * @group Utility
* @group #slow
* @coversDefaultClass \Drupal\Component\Utility\Xss * @coversDefaultClass \Drupal\Component\Utility\Xss
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
*/ */

View File

@ -23,6 +23,7 @@ use Drupal\Tests\Composer\Plugin\Scaffold\Fixtures;
* information. * information.
* *
* @group Scaffold * @group Scaffold
* @group #slow
*/ */
class ComposerHookTest extends BuildTestBase { class ComposerHookTest extends BuildTestBase {

View File

@ -24,6 +24,7 @@ use Symfony\Component\Process\Process;
* @requires extension pdo_sqlite * @requires extension pdo_sqlite
* *
* @group Command * @group Command
* @group #slow
*/ */
class QuickStartTest extends TestCase { class QuickStartTest extends TestCase {

View File

@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\Response;
/** /**
* @coversDefaultClass \Drupal\Core\DrupalKernel * @coversDefaultClass \Drupal\Core\DrupalKernel
* @group DrupalKernel * @group DrupalKernel
* @group #slow
*/ */
class DrupalKernelTest extends UnitTestCase { class DrupalKernelTest extends UnitTestCase {

View File

@ -27,6 +27,7 @@ use Symfony\Component\HttpKernel\KernelInterface;
/** /**
* @coversDefaultClass \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter * @coversDefaultClass \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter
* @group EventSubscriber * @group EventSubscriber
* @group #slow
*/ */
class ActiveLinkResponseFilterTest extends UnitTestCase { class ActiveLinkResponseFilterTest extends UnitTestCase {

View File

@ -25,6 +25,7 @@ use Symfony\Component\Process\Process;
* *
* @group Command * @group Command
* @group Recipe * @group Recipe
* @group #slow
*/ */
class RecipeQuickStartTest extends TestCase { class RecipeQuickStartTest extends TestCase {

View File

@ -15,6 +15,7 @@ use Symfony\Component\HttpFoundation\Request;
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @preserveGlobalState disabled * @preserveGlobalState disabled
* @group Security * @group Security
* @group #slow
*/ */
class RequestSanitizerTest extends UnitTestCase { class RequestSanitizerTest extends UnitTestCase {

View File

@ -14,6 +14,7 @@ use org\bovigo\vfs\vfsStream;
* @coversDefaultClass \Drupal\Core\Site\Settings * @coversDefaultClass \Drupal\Core\Site\Settings
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @group Site * @group Site
* @group #slow
*/ */
class SettingsTest extends UnitTestCase { class SettingsTest extends UnitTestCase {

View File

@ -10,6 +10,7 @@ use Symfony\Component\Process\Process;
/** /**
* @group TestSuites * @group TestSuites
* @group Test * @group Test
* @group #slow
*/ */
class PhpUnitCliTest extends UnitTestCase { class PhpUnitCliTest extends UnitTestCase {

View File

@ -19,6 +19,7 @@ use org\bovigo\vfs\vfsStream;
* *
* @coversDefaultClass \Drupal\Core\Update\UpdateRegistry * @coversDefaultClass \Drupal\Core\Update\UpdateRegistry
* @group Update * @group Update
* @group #slow
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */

View File

@ -26,6 +26,7 @@ use Symfony\Component\Process\Process;
* @see \Drupal\TestSite\Commands\TestSiteTearDownCommand * @see \Drupal\TestSite\Commands\TestSiteTearDownCommand
* *
* @group Setup * @group Setup
* @group #slow
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */