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

core_search: In tests, use faked time for indexing length

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      No manual testing instructions as this failure is entirely within unit tests.

      You can manually run as:
      vendor/bin/phpunit --testsuite=core_search_testsuite

      Show
      No manual testing instructions as this failure is entirely within unit tests. You can manually run as: vendor/bin/phpunit --testsuite=core_search_testsuite
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The partial indexing test does a check to make sure that indexing that took longer is delayed to let faster indexing areas get a chance to be indexed.

      The problem here is the timestamps stored for indexing start/end are using the real time() value - and are not passed through the get_current_time() helper - so the "time spent" processing the forum posts in the test is measured as "zero", since almost zero real time has passed. This test happens to pass in vanilla Moodle, but is able to fail on instances with more plugins installed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aolley Adam Olley
              Reporter:
              aolley Adam Olley
              Peer reviewer:
              Sam Marshall Sam Marshall
              Integrator:
              Jake Dallimore Jake Dallimore
              Tester:
              CiBoT CiBoT
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Nov/17