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

Add ability to prevent some files from being covered during unit testing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.1, 3.8
    • Fix Version/s: 3.7.1
    • Component/s: Unit tests
    • Labels:

      Description

      There are a couple of tests relating to analytics which have extremely high memory consumption when coverage generation is enabled (over 70GB).

      This happens because phpdbg and xdebug keep track of each line of code, each time that it is executed as part of their opcache logging functionality.

      Although we don't actually generate coverage for these files right now, we have no way to prevent the opcache log from running against these files due to the nature of php-code-coverage.

      It is (now) possible to do this via standard phpunit annotations - specifically the `@coversNothing` annotation. I had tried this before, but it was not working due to a bug in phpunit which I have now fixed (and has been released upstream).

        Attachments

          Activity

            People

            Assignee:
            dobedobedoh Andrew Nicols
            Reporter:
            dobedobedoh Andrew Nicols
            Peer reviewer:
            Simey Lameze
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Andrew Nicols
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 hour, 31 minutes
                1h 31m