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

core_search: In tests, use faked time for indexing length

    XMLWordPrintable

Details

    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • 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

    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

              aolley Adam Olley
              aolley Adam Olley
              Sam Marshall Sam Marshall
              Jake Dallimore Jake Dallimore
              CiBoT CiBoT
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona), Andrew Lyons, 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:
                13/Nov/17