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

Ensure APCu tests skip when enable_cli=0, instead of crash.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2
    • 3.2
    • Caching
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • Hide

      Ensure APCu is installed on your computer;

      $ brew install php70-apcu
      # apt-get install php-apcu
      

      Enable profiling of the APCu plugin in the GUI of Moodle:

      http://localhost/moodle/admin/settings.php?section=cachestore_apcu_settings
      

      For each of the combinations in the table below;
      1. Load http://localhost/moodle/cache/testperformance.php and confirm that APCu producing the correct result.
      2. Run vendor/bin/phpunit vendor/bin/phpunit cache/stores/apcu/tests/apcu_test.php

      apc.enabled apc.enable_cli GUI Response PHPUnit Response
      0 0 Invalid Plugin Skipped (S)
      0 1 Invalid Plugin Skipped (S)
      1 0 Tested Skipped (S)
      1 1 Tested Tests Run (.)
      Show
      Ensure APCu is installed on your computer; $ brew install php70-apcu # apt-get install php-apcu Enable profiling of the APCu plugin in the GUI of Moodle: http://localhost/moodle/admin/settings.php?section=cachestore_apcu_settings For each of the combinations in the table below; 1. Load http://localhost/moodle/cache/testperformance.php and confirm that APCu producing the correct result. 2. Run vendor/bin/phpunit vendor/bin/phpunit cache/stores/apcu/tests/apcu_test.php apc.enabled apc.enable_cli GUI Response PHPUnit Response 0 0 Invalid Plugin Skipped (S) 0 1 Invalid Plugin Skipped (S) 1 0 Tested Skipped (S) 1 1 Tested Tests Run (.)

      When the new APCu configuration looks like;

      apc.enabled=1
      apc.enable_cli=0
      

      Then

      vendor/bin/phpunit cache/stores/apcu/tests/apcu_test.php
      

      crashes PHPUnit rather than marking the tests as skipped.

      The above is the presented case. It's also possible that running CLI commands with APCu configured as a cachestore will crash the script.

            mr-russ Russell Smith (Inactive)
            mr-russ Russell Smith (Inactive)
            Rajesh Taneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jake Dallimore Jake Dallimore
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.