Problem/Motivation

Follow up for #3439835: Fix Field UI tests that rely on UID1's super user behavior.

Drupal\Tests\field_ui\Functional\FieldUIRouteTest has two test methods. Each test method spins up it's own new Drupal instance, which causes some extra overhead. The testAdminRoute() performs a very basic test that could easily be done at the beginning of testFieldUIRoutes() before logging in with an account so that the test uses less time/resources.

Steps to reproduce

Not applicable.

Proposed resolution

Merge both test methods. Move the contents of testAdminRoute() to the beginning of testFieldUIRoutes() before logging in with an account.

Remaining tasks

  1. Create MR.
  2. Review.
  3. Commit.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Not needed.

Issue fork drupal-3460654

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

FeyP created an issue. See original summary.

andypost’s picture

Component: field_ui.module » phpunit
feyp’s picture

Status: Postponed (maintainer needs more info) » Postponed
quietone’s picture

Version: 11.0.x-dev » 11.x-dev
feyp’s picture

Title: [PP-1] Merge test methods in FieldUIRouteTest for better performance » Merge test methods in FieldUIRouteTest for better performance
Status: Postponed » Active

@nod_ just committed the parent issue so this is now ready for someone to work on. Setting to Active.

pooja_sharma made their first commit to this issue’s fork.

pooja_sharma’s picture

Status: Active » Needs review

Moved the contents of testAdminRoute() to the beginning of testFieldUIRoutes() before logging in with an account for the optimise usage of resources & to improves test performance.

Also observed while testing on local resource usage goes from Time 00:17.865, Memory: 4.00 MB to Time: 00:09.251, Memory: 4.00 MB of test.

Please review , moving NR

catch’s picture

Status: Needs review » Fixed
Issue tags: +Test suite performance

Looks great and the pipeline is green.

catch’s picture

Status: Fixed » Reviewed & tested by the community

Wrong status.

nod_’s picture

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

Committed and pushed 302ee049e4 to 11.x and b3667201d5 to 11.0.x and 54757a4314 to 10.4.x and cc1c5e909b to 10.3.x. Thanks!

  • nod_ committed cc1c5e90 on 10.3.x
    Issue #3460654 by pooja_sharma, FeyP, catch: Merge test methods in...

  • nod_ committed 54757a43 on 10.4.x
    Issue #3460654 by pooja_sharma, FeyP, catch: Merge test methods in...

  • nod_ committed b3667201 on 11.0.x
    Issue #3460654 by pooja_sharma, FeyP, catch: Merge test methods in...
nod_’s picture

  • nod_ committed 302ee049 on 11.x
    Issue #3460654 by pooja_sharma, FeyP, catch: Merge test methods in...

Status: Fixed » Closed (fixed)

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