Moodle
  1. Moodle
  2. MDL-38840

statslib phpunit tests are failing on integration (but not locally)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.3, 2.5
    • Fix Version/s: 2.4.4
    • Component/s: Unit tests
    • Labels:
    • Rank:
      48920

      Description

      There was 1 failure:

      1) statslib_daily_testcase::test_statslib_get_start_from
      All start time
      Failed asserting that 3600 is equal to 1 or is less than 1.

      /var/lib/jenkins/git_repositories/master/lib/tests/statslib_test.php:331
      /var/lib/jenkins/git_repositories/master/lib/phpunit/classes/advanced_testcase.php:76

      To re-run:
      /usr/bin/phpunit statslib_daily_testcase lib/tests/statslib_test.php

        Activity

        Hide
        Damyon Wiese added a comment -

        It's a fail that will happen within 3 days of a DST change.

        Right now I can reproduce it by setting the timezone to Europe/Madrid. The unit test is wrongly assuming that -3 days always equals 3*24 hours.

        Show
        Damyon Wiese added a comment - It's a fail that will happen within 3 days of a DST change. Right now I can reproduce it by setting the timezone to Europe/Madrid. The unit test is wrongly assuming that -3 days always equals 3*24 hours.
        Hide
        Damyon Wiese added a comment -

        This should cherry pick - (sorry - my connection is really slow and it will take me 2 hours to pull/push stable branches from home).

        Show
        Damyon Wiese added a comment - This should cherry pick - (sorry - my connection is really slow and it will take me 2 hours to pull/push stable branches from home).
        Hide
        Damyon Wiese added a comment -

        (Amended to remove whitespace - dodgy vimrc file).

        Show
        Damyon Wiese added a comment - (Amended to remove whitespace - dodgy vimrc file).
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (24 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (24 & master), thanks!
        Hide
        Jason Fowler added a comment -

        Working well

        Show
        Jason Fowler added a comment - Working well
        Hide
        Dan Poltawski added a comment -

        Did you remember to call thankDevelopers() for 'this_weeks_work'? Defaulting to PARAM_SHODDY thanking.

        line 1289 of \lib\changes.php: call to debugging()
        line 281 of \lib\are.php: call to moodleform->detectMissingThanks()
        line 202 of \lib\now.php: call to moodleform->_is_poor_form()
        line 73 of \course\upstream.php: call to moodleform->forgetingToThank()

        Show
        Dan Poltawski added a comment - Did you remember to call thankDevelopers() for 'this_weeks_work'? Defaulting to PARAM_SHODDY thanking. line 1289 of \lib\changes.php: call to debugging() line 281 of \lib\are.php: call to moodleform->detectMissingThanks() line 202 of \lib\now.php: call to moodleform->_is_poor_form() line 73 of \course\upstream.php: call to moodleform->forgetingToThank()

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: