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.

Comments

berdir’s picture

Component: aggregator.module » simpletest.module
alexpott’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.96 KB

Whilst 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()

Status: Needs review » Needs work

The last submitted patch, 2: 1914668.2.patch, failed testing.

The last submitted patch, 2: 1914668.2.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new8.18 KB
new4.61 KB

Okay fixing some of the test fails

The last submitted patch, 5: 1914668.5.patch, failed testing.

alexpott’s picture

StatusFileSize
new663 bytes
new8.53 KB

Fixing the remaining test failures.

Status: Needs review » Needs work

The last submitted patch, 7: 1914668.7.patch, failed testing.

berdir’s picture

(migrate test fails) Is it possible that we're missing the relevant config schema here and then the casting doesn't work as expected?

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new2.72 KB
new8.91 KB

ConfigFactory persistence was stopping the new schemas from being used since the definitions where still statically cached in the ConfigFactory.

Status: Needs review » Needs work

The last submitted patch, 10: 1914668.10.patch, failed testing.

sun’s picture

I'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.

sun’s picture

For 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

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Component: simpletest.module » phpunit

Triaging 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.

alexpott’s picture

Status: Needs work » Closed (outdated)

The 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.