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

Timezone dependent test results

    XMLWordPrintable

Details

    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • Hide
      • Requires root access to your computer.
      1. Init your phpunit environment: php admin/tool/phpunit/cli/init.php
      2. Download the allhours.sh script and put it in your moodle base directory.
      3. From terminal, go to your moodle base directory and execute sudo ./allhours.sh.
      4. You will be prompted for the root password in order to allow the script to change the system date.
      5. Script output will run for every hour of March 15th and September 15th. Verify that all combinations end with an OK message and that the final message is "ALL OK, yay!!".
      6. IMPORTANT: Don't forget to change your system date and time back to current once you've finished testing this (from Control Panel or whatever, it depends of your system).

      Optional... without the patch applied and following the instructions above... you will get a failure @ September 15th 23:15 UTC. That's what this patch is fixing.

      Show
      Requires root access to your computer. Init your phpunit environment: php admin/tool/phpunit/cli/init.php Download the allhours.sh script and put it in your moodle base directory. From terminal, go to your moodle base directory and execute sudo ./allhours.sh . You will be prompted for the root password in order to allow the script to change the system date. Script output will run for every hour of March 15th and September 15th. Verify that all combinations end with an OK message and that the final message is "ALL OK, yay!!". IMPORTANT: Don't forget to change your system date and time back to current once you've finished testing this (from Control Panel or whatever, it depends of your system). Optional... without the patch applied and following the instructions above... you will get a failure @ September 15th 23:15 UTC. That's what this patch is fixing.

    Description

      While we cleaned a lot of the failures happening on unit tests moving from moodle tz handling to more robust php tz handling... there are still some problems that happen near TZ changes (twice a year).

      This issue is about to find them and, if possible, fix them. All problems will be reported here with 1) the UTC time they happened and 2) the complete error.

      A) Mon Apr 01 22:27:09 UTC 2019, Sat Apr 06 22:39:47 UTC 2019, Mon Apr 08 22:27:09 UTC 2019

      mod_chat_lib_testcase::test_chat_core_calendar_provide_event_action_chattime_event_different_timezones
      Failed asserting that core_calendar\local\event\value_objects\action Object &000000006f6b1e2f000000006102133e (
          'name' => 'Click here to enter the chat now'
          'url' => moodle_url Object &000000006f6b1722000000006102133e (
              'scheme' => 'https'
              'host' => 'www.example.com'
              'port' => ''
              'user' => ''
              'pass' => ''
              'path' => '/moodle/mod/chat/view.php'
              'slashargument' => ''
              'anchor' => null
              'params' => Array &0 (
                  'id' => '222000'
              )
          )
          'itemcount' => 1
          'actionable' => true
      ) is null.
       
      /var/www/html/mod/chat/tests/lib_test.php:414
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit --verbose "mod_chat_lib_testcase" mod/chat/tests/lib_test.php
      

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Simey Lameze Simey Lameze
              Jake Dallimore Jake Dallimore
              CiBoT CiBoT
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/May/19

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours, 51 minutes
                  5h 51m