diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index f71e1a2..4a6e738 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');
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 5594dd5..6eba9ed0 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -79,6 +79,7 @@
 simpletest_script_reporter_init();
 
 // Execute tests.
+$test_list = array_fill(0, 100, 'Drupal\file\Tests\UsageTest');
 for ($i = 0; $i < $args['repeat']; $i++) {
   simpletest_script_execute_batch($test_list);
 }
