diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index f71e1a2e93981a419fc4d0825594d02cc8eca481..4a6e7389b6df5524e1e651c2046bcff018d5d4b1 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -1148,6 +1148,10 @@ private function restoreEnvironment() { } } + // Sleep for 50ms to allow shutdown functions and terminate events to + // complete. Further information: https://drupal.org/node/2194357. + usleep(50000); + // Remove all prefixed tables. // @todo Connection prefix info is not normalized into an array. $original_connection_info = Database::getConnectionInfo('simpletest_original_default');