diff --git a/core/lib/Drupal/Core/Test/TestDatabase.php b/core/lib/Drupal/Core/Test/TestDatabase.php
index 682c792..dbda714 100644
--- a/core/lib/Drupal/Core/Test/TestDatabase.php
+++ b/core/lib/Drupal/Core/Test/TestDatabase.php
@@ -115,7 +115,8 @@ protected function getTestLock() {
     // tests are run concurrently.
     do {
       $lock_id = mt_rand(10000000, 99999999);
-      if (@symlink(__FILE__, $this->getLockFile($lock_id)) === FALSE) {
+      $lock_file = $this->getLockFile($lock_id);
+      if (@symlink(__FILE__, $lock_file) === FALSE && @copy(__FILE__, $lock_file) === FALSE) {
         $lock_id = NULL;
       }
     } while ($lock_id === NULL);
