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

Redis tests show warnings when Redis is not installed in 3.8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.8
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide
      1. Make sure you don't have phpredis extenstion or it is disabled
      2. Run phpunit tests from cache/stores/redis/tests/compressor_test.php
      3. They should all be skipped, no errors, no warnings

      (Maybe integrators will be kind to skip manual testing of this issue and assign it to cibot)

      Show
      Make sure you don't have phpredis extenstion or it is disabled Run phpunit tests from cache/stores/redis/tests/compressor_test.php They should all be skipped, no errors, no warnings (Maybe integrators will be kind to skip manual testing of this issue and assign it to cibot)
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-67087-master

      Description

      When Redis is not installed the redis tests are supposed to be skipped, but on 3.8 they show warnings:

      $  ./vendor/bin/phpunit cache/stores/redis/tests/compressor_test.php
      Moodle 3.8dev+ (Build: 20191030), d7699706da7f438008c2137c5fb71826d1e22c1e
      Php: 7.1.32, pgsql: 11.5, OS: Darwin 19.0.0 x86_64
      PHPUnit 7.5.17 by Sebastian Bergmann and contributors.
       
      SSSSSSSSSSSSSSSSSWW                                               19 / 19 (100%)
       
      Time: 1.01 seconds, Memory: 40.00 MB
       
      There were 2 warnings:
       
      1) Warning
      The data provider specified for cachestore_redis_compressor_test::test_it_can_use_getset is invalid.
      Class 'Redis' not found
       
      To re-run:
       vendor/bin/phpunit "PHPUnit\Framework\WarningTestCase" vendor/phpunit/phpunit/src/Framework/WarningTestCase.php
       
      2) Warning
      The data provider specified for cachestore_redis_compressor_test::test_it_can_use_getsetmany is invalid.
      Class 'Redis' not found
       
      To re-run:
       vendor/bin/phpunit "PHPUnit\Framework\WarningTestCase" vendor/phpunit/phpunit/src/Framework/WarningTestCase.php
       
      WARNINGS!
      Tests: 19, Assertions: 0, Warnings: 2, Skipped: 17.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Eloy Lafuente (stronk7)
              Integrator:
              Andrew Nicols
              Tester:
              Ferran Recio
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/19

                  Time Tracking

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