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

Redis tests show warnings when Redis is not installed in 3.8

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.8
    • 3.8
    • Unit tests
    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-67087-master
    • 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)

    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

              marina Marina Glancy
              marina Marina Glancy
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              Ferran Recio Ferran Recio
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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