Problem/Motivation
`ComponentRenderTest` contains lots of "test" (quotes intended) methods.
For testing performance reasons, this didn't use proper test methods when included in core.
Since then we've improved our testing performance by a lot.
And the real issue is, because of how phpunit handles exceptions, this might be hiding bugs/BC breaks.
E.g. checkInvalidSlot includes expectException. This means that once the exception is triggered, the test passes. But then checkEmptyProps never runs!
Steps to reproduce
See MR !13117 which is passing but should be failing.
Proposed resolution
Each `check` method should be a proper isolated test method.
Remaining tasks
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
None.
Release notes snippet
None.
Issue fork drupal-3543939
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
Comment #3
penyaskitoComment #5
penyaskitoComment #6
penyaskitoComment #7
penyaskitoComment #8
grimreaperHi,
Looks good to me. Especially with the other MR as POC to demonstrate the problem.
If this does not cause performance issue anymore, it should be good.
Comment #9
catchIf you look at the MR output for kernel test jobs, you can see how long the test takes to run.
26.121s Drupal\KernelTests\Components\ComponentRenderTest 14 passedThe longest Kernel tests are over 3 minutes so there's no benefit to consolidating the methods here and the MR should be fine.
Comment #11
nod_not backporting to 10.x
Committed and pushed 3a9f2bab7e5 to 11.x and 17f7df3e200 to 11.2.x. Thanks!