Problem/Motivation

If you have an app server with just one database you can't run tests because the first request will put the database prefix into the database service and consequent requests will make every service talking to the database hit the wrong prefix.

Also, multisite and app server will hit this problem too.

Steps to reproduce

  1. Develop the temporal module
  2. Try to write functional tests
  3. Give up, close connection on every request

Proposed resolution

Database::addConnectionInfo() could propagate the info to existing connections.

Remaining tasks

Have someone with a galaxy brain figure out what the heck this is going to break. I am just a Bear of Very Little Brain and I can't think of anything. No normal code calls addConnectionInfo, right? Right?!

TestSetupTrait::changeDatabasePrefix very very likely could make use of this. Is that a followup? Should it be here?

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3626224

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

ghost of drupal past created an issue. See original summary.

ghost of drupal past’s picture

Issue summary: View changes
ghost of drupal past’s picture

Issue summary: View changes
Status: Active » Needs review