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

Fix Redis session tests

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4, 3.5.6, 3.6.4, 3.7
    • Fix Version/s: 3.5.7, 3.6.5, 3.7.1
    • Component/s: Unit tests
    • Labels:
    • Environment:
      PHP 7.2+
    • Testing Instructions:
      Hide
      Requirements:
      1. Please set php version to 7.2
      2. Make sure that the redis PHP extension is also installed. If not installed (e.g. on Ubuntu/Linuxmint):

        sudo apt install -y php-redis
        sudo service apache2 restart
        

      Test
      1. Spin up a redis server:

        docker run --name my-redis --network host -d redis 

      2. Edit your config.php to add:

        define('TEST_SESSION_REDIS_HOST', '127.0.0.1');
        

      3. Run phpunit on the redis sessions:

        ./vendor/bin/phpunit lib/tests/session_redis_test.php
        

        1. Confirm pass (not skip)
      4. Run a full phpunit run without process isolation:

        ./vendor/bin/phpunit
        

        1. Confirm pass of entire suite
      Show
      Requirements: Please set php version to 7.2 Make sure that the redis PHP extension is also installed. If not installed (e.g. on Ubuntu/Linuxmint): sudo apt install -y php-redis sudo service apache2 restart Test Spin up a redis server: docker run --name my-redis --network host -d redis Edit your config.php to add: define('TEST_SESSION_REDIS_HOST', '127.0.0.1'); Run phpunit on the redis sessions: ./vendor/bin/phpunit lib/tests/session_redis_test.php Confirm pass (not skip) Run a full phpunit run without process isolation: ./vendor/bin/phpunit Confirm pass of entire suite
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-60978-master

      Description

      In MDL-60951 we disabled the redis unit tests on travis because we were seeing failures due to https://bugs.php.net/bug.php?id=75628

      This bug makes it impossible to unit test session handlers on php 7.2 so until it's fixed upstream and travis update to a "fixed" php version, we had to disable those tests.

      This issue is a followup to re-enable redis when the upstream bug is fixed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 1 hour, 25 minutes
                  1d 1h 25m