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

Random test failure in backup cron helper

    XMLWordPrintable

Details

    Description

      This query: https://github.com/moodle/moodle/blob/6652ec135b08e6633e7f82570edc65f7abb6c1f0/backup/util/helper/backup_cron_helper.class.php#L90-L96 can produce random ordering when the two ordered fields are equal, as happens in the accompanying testcase: https://github.com/moodle/moodle/blob/6652ec135b08e6633e7f82570edc65f7abb6c1f0/backup/util/helper/tests/cronhelper_test.php#L379-L393 (originally from MDL-65201)

      This results in failures such as the following:

      1) backup_cron_helper_testcase::test_get_courses
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'148002'
      +'148003'
       
      /home/runner/work/moodle/moodle/backup/util/helper/tests/cronhelper_test.php:427
      /home/runner/work/moodle/moodle/lib/phpunit/classes/advanced_testcase.php:80
      

      e.g. here: https://github.com/mudrd8mz/moodle/runs/5056386624?check_suite_focus=true

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Sujith Haridasan Sujith Haridasan
              Jake Dallimore Jake Dallimore
              Gladys Basiana Gladys Basiana
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Jul/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 15 minutes
                  2h 15m