Problem/Motivation

This test takes around 340s to complete, making it the slowest running test in core by about 150-200 seconds. Might vary by runners but seen it on a couple of test runs now. One example below:

https://git.drupalcode.org/issue/drupal-3317769/-/jobs/7216467

 178.776s Drupal\Tests\system\Functional\Module\DependencyTest                     11 passed, 1 skipped
 334.364s Drupal\FunctionalTests\DefaultContent\ContentExportTest                   9 passed

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3558021

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

Some of the test cases don't use the recipe that's applied in setup, so splitting the class in two between methods that need it and ones that don't is probably a quick fix.

catch’s picture

Status: Active » Needs review

Unfortunately not quite true that some methods don't use the recipe - they use the entity bundles/fields defined by the recipe.

Consolidating four tests methods seems like it more or less does the trick though.

catch’s picture

Something is up with the runners this morning and everything is twice as slow now, but this looks relatively faster even if it's absolutely slower:

306.218s Drupal\Tests\system\Functional\Module\DependencyTest                     11 passed, 1 skipped
  34.259s Drupal\Tests\standard\Functional\StandardTest                             1 passed
 367.294s Drupal\FunctionalTests\DefaultContent\ContentExportTest                   6 passed
catch’s picture

Title: ContentExportTest is slow » Default content tests are slow

Might as well do ContentImportTest here at the same time - similarly a lot slower than all the other functional tests.

catch’s picture

No longer the slowest tests. Drupal\Tests\system\Functional\Module\DependencyTest and Drupal\Tests\system\Functional\Module\NonStableModulesTest are slowest overall.

 104.865s Drupal\FunctionalTests\DefaultContent\ContentImportAlreadyExistsTest  
260.591s Drupal\FunctionalTests\DefaultContent\ContentExportTest                   3 passed
253.702s Drupal\FunctionalTests\DefaultContent\ContentImportTest                   4 passed
catch’s picture

Issue summary: View changes
alexpott’s picture

Status: Needs review » Reviewed & tested by the community

This looks great - I'd be tempted to move to #[TestWith] instead of the data provider - but that shouldn't hold this up.

  • nod_ committed aeae5fd1 on 11.3.x
    task: #3558021 Default content tests are slow
    
    By: @catch
    By: @alexpott...

  • nod_ committed 0e933cb4 on 11.x
    task: #3558021 Default content tests are slow
    
    By: @catch
    By: @alexpott
    
nod_’s picture

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

Committed and pushed e19de46381d to 11.x and aeae5fd1c0e to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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