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

Unit tests fail in core_cache_testcase (for at least two Windows systems)

    Details

    • Testing Instructions:
      Hide

      On each of linux, windows and Mac (as the PHP server)
      Using two classes of PHP on Windows (PHP > 5.4.14+, 5.5.1+ and PHP less than those versions)

      1. Run units tests ensure they pass and no errors (PHP > 5.4.14+, 5.5.1+)
      2. Login and record your sesskey.
      3. Logout and back in and confirm your sesskey is different.

      Show
      On each of linux, windows and Mac (as the PHP server) Using two classes of PHP on Windows (PHP > 5.4.14+, 5.5.1+ and PHP less than those versions) 1. Run units tests ensure they pass and no errors (PHP > 5.4.14+, 5.5.1+) 2. Login and record your sesskey. 3. Logout and back in and confirm your sesskey is different.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-41198-master

      Description

      On my system, and at least one other in the wild (see this forum discussion https://moodle.org/mod/forum/discuss.php?d=233467), either 2 or 3 unit tests in the complete run always fail. Here is the output:

      There were 3 failures:
       
      1) core_cache_testcase::test_session_cache_switch_user
      Failed asserting that 'RYpeokgWPc' is not equal to <string:RYpeokgWPc>.
       
      C:\Users\sm449\workspace\core-moodle-github\cache\tests\cache_test.php:1201
      C:\Users\sm449\workspace\core-moodle-github\lib\phpunit\classes\advanced_testcase.php:76
       
      To re-run:
       c:/Users/sm449/workspace/core-moodle-github/vendor/phpunit/phpunit/composer/bin/phpunit core_cache_testcase cache\tests\cache_test.php
       
      2) core_cache_testcase::test_session_cache_switch_user_application_mapping
      Failed asserting that 'Jl8SwMDn1a' is not equal to <string:Jl8SwMDn1a>.
       
      C:\Users\sm449\workspace\core-moodle-github\cache\tests\cache_test.php:1237
      C:\Users\sm449\workspace\core-moodle-github\lib\phpunit\classes\advanced_testcase.php:76
       
      To re-run:
       c:/Users/sm449/workspace/core-moodle-github/vendor/phpunit/phpunit/composer/bin/phpunit core_cache_testcase cache\tests\cache_test.php
       
      3) core_cache_testcase::test_session_cache_switch_user_multiple
      Failed asserting that 'SSFoxtGSBH' is not equal to <string:SSFoxtGSBH>.
       
      C:\Users\sm449\workspace\core-moodle-github\cache\tests\cache_test.php:1302
      C:\Users\sm449\workspace\core-moodle-github\lib\phpunit\classes\advanced_testcase.php:76
      

      This can NOT be reproduced on Tim's system even though we run on the same infrastructure. I haven't heard of another developer seeing this issue, either. So basically not reproducible.

      It may indicate a problem with my settings in config.php in which case it could be useful to add the answer to the docs page: http://docs.moodle.org/dev/Common_unit_test_problems

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/14