MDL-49772 behat: Removed optimization as it's not required
authorRajesh Taneja <rajesh@moodle.com>
Wed, 27 May 2015 03:20:48 +0000 (11:20 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Wed, 27 May 2015 03:20:48 +0000 (11:20 +0800)
This api is called very few times in behat
initilisation process, so such optimization
is an over engineer. Hence removing it.

lib/behat/classes/behat_config_manager.php

index f9d6c5a..0108064 100644 (file)
@@ -273,12 +273,6 @@ class behat_config_manager {
      * @return int
      */
     public final static function get_parallel_test_runs($runprocess = 0) {
-        global $CFG;
-
-        // Optimise reading this information from file.
-        if (!empty($CFG->behatparallelprocesses)) {
-            return $CFG->behatparallelprocesses;
-        }
 
         $parallelrun = 0;
         // Get parallel run info from first file and last file.
@@ -289,8 +283,6 @@ class behat_config_manager {
             }
         }
 
-        $CFG->behatparallelprocesses = $parallelrun;
-
         return $parallelrun;
     }