Problem/Motivation

These are the longest running functional javascript tests, we can consolidate some test methods to do fewer installs and stop using data providers where it's easy to do a foreach loop instead.

Steps to reproduce

The first of two functional javascript test jobs usually takes around 4m10s.

https://git.drupalcode.org/project/drupal/-/jobs/2211376 is 3m29s

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3463456

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

This moves around half the methods in the test to protected methods - mostly the ones that don't change any configuration. On my local ddev it reduces runtime from just under 3 minutes to around 2m 30s, but it's very different on gitlab with concurrency - hopefully can get an idea from the test run.

catch’s picture

Doesn't reduce the overall job time yet, but finished seventh from last on https://git.drupalcode.org/project/drupal/-/jobs/2210968

catch’s picture

Title: Consolidate ckeditor5's MediaTest » Consolidate ckeditor5's FunctionalJavascript tests
Issue summary: View changes

SourceEditingTest completing in about 1/6 the time with a foreach loop instead of a data provider.

Before:

../vendor/bin/phpunit modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php 
PHPUnit 10.5.26 by Sebastian Bergmann and contributors.

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

......................                                            22 / 22 (100%)

Time: 02:24.161, Memory: 6.00 MB

After:

../vendor/bin/phpunit modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php 
PHPUnit 10.5.26 by Sebastian Bergmann and contributors.

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

..                                                                  2 / 2 (100%)

Time: 00:23.510, Memory: 6.00 MB
catch’s picture

https://git.drupalcode.org/project/drupal/-/jobs/2211630 down to 3m26 seconds from around 4m10s now.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

This one took a little longer to review but don't believe any coverage has been lost.

  • nod_ committed c598215b on 10.3.x
    Issue #3463456 by catch, smustgrave: Consolidate ckeditor5's...

  • nod_ committed a8ea546d on 10.4.x
    Issue #3463456 by catch, smustgrave: Consolidate ckeditor5's...

  • nod_ committed a43be094 on 11.0.x
    Issue #3463456 by catch, smustgrave: Consolidate ckeditor5's...

  • nod_ committed 2d94b30e on 11.x
    Issue #3463456 by catch, smustgrave: Consolidate ckeditor5's...
nod_’s picture

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

Committed and pushed 2d94b30e56 to 11.x and a43be0945b to 11.0.x and a8ea546de2 to 10.4.x and c598215b8c to 10.3.x. Thanks!

Status: Fixed » Closed (fixed)

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