Problem/Motivation
Follow-up #3151094: Replace use of whitelist/blacklist in \Drupal\Core\Template classes and their tests, pointed by @alexpott.
In fact we should file a follow-up to move this annotation to the class because there are so many statics involved with the Settings.
@runInSeparateProcess
Indicates that a test should be run in a separate PHP process.
@runTestsInSeparateProcesses
Indicates that all tests in a test class should be run in a separate PHP process.
See https://phpunit.readthedocs.io/en/8.5/annotations.html
Proposed resolution
Use @runTestsInSeparateProcesses
on the class instead of @runInSeparateProcess
on each individual test method.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3164161-2.runTestsInSeparateProcesses.patch | 1.15 KB | dww |
Comments
Comment #2
dwwUpdating the proposed resolution in the summary:
Use
@runTestsInSeparateProcesses
on the class instead of@runInSeparateProcess
on each individual test method.Seems to be working as intended:
Before
After
The ~4-5 second increase is consistent, even after a few runs, and has got to be from running all the other tests in separate processes, too.
;)
Comment #3
longwaveRationale makes sense, patch looks good.
Comment #4
dwwCool, thanks for the RTBC, @longwave!
Slightly better title for the commit message.
Crediting @jungle for opening this and initial research, and @longwave for the review.
Cheers,
-Derek
Comment #5
alexpottCommitted edd88ad and pushed to 9.1.x. Thanks!