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

Random phpunit failure "test_upgrade_fix_file_timestamps"

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide
      1. Run the following, confirm tests pass:

        $ vendor/bin/phpunit --repeat 360 lib/tests/upgradelib_test.php --filter test_upgrade_fix_file_timestamps
        

        or on MDK

        mdk phpunit -r --filter test_upgrade_fix_file_timestamps --repeat 360
        

      Show
      Run the following, confirm tests pass: $ vendor/bin/phpunit --repeat 360 lib/tests/upgradelib_test.php --filter test_upgrade_fix_file_timestamps or on MDK mdk phpunit -r --filter test_upgrade_fix_file_timestamps --repeat 360

      It has started to happen recently (end of May 2022) and ofter (> 10 failures in less than a month).

      Detected in both SQL*Server and Oracle runs... and also in GHA ones.

      Link: https://ci.moodle.org/job/S.01.05%20-%20PHPUnit%20-%20Oracle/1078/

      There was 1 failure:
       
      1) upgradelib_test::test_upgrade_fix_file_timestamps
      Failed asserting that '1655245021' matches expected 1655245020.
       
      /var/www/html/lib/tests/upgradelib_test.php:1716
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
      

      It clearly looks like the typical "jump of second" random, so it shouldn't be hard to fix.

      Detected in master runs, but it may happen also in older branches, worth checking for the test existence.

            pholden Paul Holden
            stronk7 Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Jun Pataleta Jun Pataleta
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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