Problem/Motivation
In #2926633: Provide a script to install a Drupal testsite we're creating the ability to create test sites via a php command. These need to always create a lock file to prevent database prefix re-use. At the moment when you run tests directly via phpunit lock files are not taken out because there is no way to run concurrently. Nightwatch supports concurrent testing.
Proposed resolution
We should always create a lock file. If RUN_TESTS_CONCURRENCY is not set or equal to 1 then we should remove it once the test is finished after all the tables and files have been removed.
This will maintain the behaviour of run-tests.sh at high concurrency but it will also result in simplification in the TestDatabase methods and a more predictable system as the lock is always taken.
Remaining tasks
This is postponed on #2926633: Provide a script to install a Drupal testsite
User interface changes
None
API changes
Limited to the internal test API.
Comments
Comment #2
mile23#2926633: Provide a script to install a Drupal testsite is in, but it lacks tests: #2962157: TestSiteApplicationTest requires a database despite being a unit test
Leaving postponed.
Comment #5
mile23One (almost two) releases later, probably OK to un-postpone.
Comment #6
mile23