Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62408

Behat tests never use profile_guided_allocate

XMLWordPrintable

    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-62408_master
    • Hide
      1. Define a timing file by defining BEHAT_FEATURE_TIMING_FILE in config.php
      2. Run some behat tests in a parallel run (e.g. /admin/tool/behat/cli/init -j=3 then admin/tool/behat/run.php)
        • Note the timings for each thread
      3. Run the tests again
        • You should see a histogram displaying the allocation of features to each thread.
        • Compare the timings for each thread to the first run. They should be more evenly distributed than before.
      Show
      Define a timing file by defining BEHAT_FEATURE_TIMING_FILE in config.php Run some behat tests in a parallel run (e.g. /admin/tool/behat/cli/init -j=3 then admin/tool/behat/run.php ) Note the timings for each thread Run the tests again You should see a histogram displaying the allocation of features to each thread. Compare the timings for each thread to the first run. They should be more evenly distributed than before.

      The profile_guided_allocate function which is supposed to divide behat tests into even-sized buckets for parallel runs is never used. The function starts with:

      if (defined('PHPUNIT_TEST')) {
        return false;
      }

      but this should be

      if (defined('PHPUNIT_TEST') && PHPUNIT_TEST) {
        return false;
      }

      since the constant is defined even when running a behat test (but defined as false). This means step or timing files are never used, limiting the benefit of parallel runs.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.