Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php Mon Apr 23 09:33:26 2018 +0100 +++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php Mon Apr 23 09:46:53 2018 +0100 @@ -42,6 +42,18 @@ protected $configDirectories = []; /** + * The flag to set 'apcu_ensure_unique_prefix' setting. + * + * Wide use of a unique prefix can lead to problems with memory, if tests are + * run with a concurrency higher than 1. Therefore, FALSE by default. + * + * @var bool + * + * @see \Drupal\Core\Site\Settings::getApcuPrefix(). + */ + protected $apcuEnsureUniquePrefix = FALSE; + + /** * Prepares site settings and services before installation. */ protected function prepareSettings() { @@ -83,6 +95,10 @@ 'value' => $this->originalProfile, 'required' => TRUE, ]; + $settings['settings']['apcu_ensure_unique_prefix'] = (object) [ + 'value' => $this->apcuEnsureUniquePrefix, + 'required' => TRUE, + ]; $this->writeSettings($settings); // Allow for test-specific overrides. $settings_testing_file = DRUPAL_ROOT . '/' . $this->originalSite . '/settings.testing.php';