diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php
index d8d36088ac..f037c813cb 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandler.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php
@@ -229,6 +229,15 @@ public function buildModuleDependencies(array $modules) {
         }
       }
     }
+    global $count;
+    if (!$count) {
+      $count = 0;
+      file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/graph.log','-----' . PHP_EOL . PHP_EOL, FILE_APPEND | LOCK_EX);
+    }
+    $count++;
+    file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/graph.log', $count . PHP_EOL, FILE_APPEND | LOCK_EX);
+    ini_set("precision", 20);
+    file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/graph.log', microtime(TRUE) . ': before ' . count($graph) . PHP_EOL, FILE_APPEND | LOCK_EX);
     $graph_object = new Graph($graph);
     $graph = $graph_object->searchAndSort();
     foreach ($graph as $module_name => $data) {
@@ -236,6 +245,7 @@ public function buildModuleDependencies(array $modules) {
       $modules[$module_name]->requires = isset($data['paths']) ? $data['paths'] : [];
       $modules[$module_name]->sort = $data['weight'];
     }
+    file_put_contents(\Drupal::root() . '/sites/default/files/simpletest/graph.log', microtime(TRUE) . ': after ' . count($modules) . PHP_EOL . PHP_EOL, FILE_APPEND | LOCK_EX);
     return $modules;
   }
 
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);
