Problem/Motivation

This single kernel test takes 165s, if we use a foreach instead of a data provider we can cut it down to about 10.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3466524

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review

Before:

../vendor/bin/phpunit tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
PHPUnit 10.5.29 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.10
Configuration: /var/www/html/core/phpunit.xml

S.SSS.SSS.S.SS.S..S.S...S.SS.SS..SS.SSSSSSS....SS........S.....  63 / 144 ( 43%)
SSS.SSS.SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 126 / 144 ( 87%)
SSSSSSSSSSSSSSSSSS                                              144 / 144 (100%)

Time: 01:42.386, Memory: 6.00 MB

OK, but some tests were skipped!
Tests: 144, Assertions: 323, Skipped: 109.
../vendor/bin/phpunit tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
PHPUnit 10.5.29 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.10
Configuration: /var/www/html/core/phpunit.xml

..                                                                  2 / 2 (100%)

Time: 00:14.271, Memory: 6.00 MB

OK (2 tests, 39 assertions)

If data providers weren't static, we could filter the list in there, but they're not, so we can't do that.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straight forward

  • longwave committed a0442b5f on 10.3.x
    Issue #3466524 by catch: ModuleConfigureRouteTest is slow
    
    (cherry...

  • longwave committed ac0a3c1f on 10.4.x
    Issue #3466524 by catch: ModuleConfigureRouteTest is slow
    
    (cherry...

  • longwave committed 46919be3 on 11.0.x
    Issue #3466524 by catch: ModuleConfigureRouteTest is slow
    
    (cherry...

  • longwave committed d3b144d3 on 11.x
    Issue #3466524 by catch: ModuleConfigureRouteTest is slow
    
longwave’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Makes total sense if we can speed up the test by about 7x.

Committed and pushed d3b144d302 to 11.x and 46919be380 to 11.0.x and ac0a3c1f64 to 10.4.x and a0442b5f2e to 10.3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.