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

core_search: In tests, use faked time for indexing length

XMLWordPrintable

    • 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

      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.

            aolley Adam Olley
            aolley Adam Olley
            Sam Marshall Sam Marshall
            Jake Dallimore Jake Dallimore
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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