Looks we're currently calling that function 3 times during a test installation, _install_profile_modules_finished(), install_finished() and resetAll(). This results in 3 router rebuilds for every test method, among other things.
Wondering if we can remove some of them and replace with more targeted cache clears. This function makes up ~35% of the whole test time on a test with 3 test methods.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 1914668.10.patch | 8.91 KB | alexpott |
| #10 | 7-10-interdiff.txt | 2.72 KB | alexpott |
| #7 | 1914668.7.patch | 8.53 KB | alexpott |
| #7 | 5-7-interdiff.txt | 663 bytes | alexpott |
| #5 | 2-5-interdiff.txt | 4.61 KB | alexpott |
Comments
Comment #1
berdirComment #2
alexpottWhilst working on #2164367: Rebuild router as few times as possible per request I noticed we might be able to save some dfac() in the installer and WebTestBase::setUp()
Comment #5
alexpottOkay fixing some of the test fails
Comment #7
alexpottFixing the remaining test failures.
Comment #9
berdir(migrate test fails) Is it possible that we're missing the relevant config schema here and then the casting doesn't work as expected?
Comment #10
alexpottConfigFactory persistence was stopping the new schemas from being used since the definitions where still statically cached in the ConfigFactory.
Comment #12
sunI'm a bit worried:
Why do we need to change all of those tests here? (and even convert them into DUTB?)
Doing so leaves me with the impression that we're working around a deeper root cause instead of fixing it.
Comment #13
sunFor the sake of keeping things as focused as possible, I've created a separate issue for the installer changes only:
#2201785: Remove drupal_flush_all_caches() from installer
Comment #22
quietone commentedTriaging issues in simpletest.module as part of the Bug Smash Initiative to determine if they should be in the Simpletest Project or core.
Moving to phpunit.
Comment #23
alexpottThe tests converted to kernel tests in #10 already have been. WebTestBase doesn't exist anymore. And the config.factory service is not persisted. So I think anything around rebuilding/cache flushing in tests will have to start fresh. Note #3157954: Remove unnecessary route rebuild from tests has just landed.