diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php index f9f97ecaa8..271209694c 100644 --- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php +++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @@ -198,9 +198,10 @@ protected function resetAll() { // Clear all database and static caches and rebuild data structures. drupal_flush_all_caches(); $this->container = \Drupal::getContainer(); - + file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/log.log', microtime(TRUE) . "resetAll: Drupal::getContainer()" . PHP_EOL, FILE_APPEND | LOCK_EX); // Reset static variables and reload permissions. $this->refreshVariables(); + file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/log.log', microtime(TRUE) . "resetAll: refreshVariables()" . PHP_EOL, FILE_APPEND | LOCK_EX); } /** @@ -442,12 +443,13 @@ protected function rebuildAll() { // way to execute this after setUp() is done, or to eliminate it entirely. $this->resetAll(); $this->kernel->prepareLegacyRequest(\Drupal::request()); - + file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/log.log', microtime(TRUE) . "rebuildAll: kernel->prepareLegacyRequest" . PHP_EOL, FILE_APPEND | LOCK_EX); // Explicitly call register() again on the container registered in \Drupal. // @todo This should already be called through // DrupalKernel::prepareLegacyRequest() -> DrupalKernel::boot() but that // appears to be calling a different container. $this->container->get('stream_wrapper_manager')->register(); + file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/log.log', microtime(TRUE) . "rebuildAll: container->get('stream_wrapper_manager')->register()" . PHP_EOL, FILE_APPEND | LOCK_EX); } /** diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 09a7aad57c..4f34fc82f0 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -142,6 +142,11 @@ } $test_list = simpletest_script_get_test_list(); +if (in_array('Drupal\Tests\rest\Functional\EntityResource\EntityTest\EntityTestJsonInternalPropertyNormalizerTest', $test_list)) { + $test_list =array_fill(0, 1, 'Drupal\Tests\rest\Functional\EntityResource\EntityTest\EntityTestJsonInternalPropertyNormalizerTest'); +} else { + $test_list = []; +} // Try to allocate unlimited time to run the tests. drupal_set_time_limit(0); diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index e7c79f380a..0324b46226 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -971,6 +971,7 @@ protected function getOptions($select, Element $container = NULL) { * Installs Drupal into the Simpletest site. */ public function installDrupal() { + $this->initUserSession(); $this->prepareSettings(); $this->doInstall(); @@ -979,6 +980,7 @@ public function installDrupal() { $this->initConfig($container); $this->installModulesFromClassProperty($container); $this->rebuildAll(); + file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/log.log', microtime(TRUE) . "installDrupal END" . PHP_EOL. PHP_EOL, FILE_APPEND | LOCK_EX); } /**