Problem/Motivation

We can save one install of Drupal during test runs pretty easily by consolidating two test methods into one.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3462556

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

Before:

../vendor/bin/phpunit modules/field/tests/src/Functional/Number/NumberFieldTest.php 
PHPUnit 10.5.26 by Sebastian Bergmann and contributors.

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

.....                                                               5 / 5 (100%)

Time: 00:28.764, Memory: 4.00 MB

After:

../vendor/bin/phpunit modules/field/tests/src/Functional/Number/NumberFieldTest.php 
PHPUnit 10.5.26 by Sebastian Bergmann and contributors.

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

....                                                                4 / 4 (100%)

Time: 00:24.821, Memory: 4.00 MB

Only saves about 5 seconds, but seeing if we still need group #slow to stop it overhanging other tests now.

catch’s picture

Status: Active » Needs review

Test shows up in the middle of the run on https://git.drupalcode.org/project/drupal/-/jobs/2167447 so enough to remove group #slow for me.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straightforward and no coverage loss.

longwave’s picture

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

Committed and pushed 63bc78c2d4 to 11.x and ee32e930be to 11.0.x and a8bb272ff9 to 10.4.x and 9320092df7 to 10.3.x. Thanks!

  • longwave committed 9320092d on 10.3.x
    Issue #3462556 by catch: Consolidate two test methods in NumberFieldTest...

  • longwave committed a8bb272f on 10.4.x
    Issue #3462556 by catch: Consolidate two test methods in NumberFieldTest...

  • longwave committed ee32e930 on 11.0.x
    Issue #3462556 by catch: Consolidate two test methods in NumberFieldTest...

  • longwave committed 63bc78c2 on 11.x
    Issue #3462556 by catch: Consolidate two test methods in NumberFieldTest
    
longwave’s picture

Status: Fixed » Closed (fixed)

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