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

phpunit failures in backup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7
    • Fix Version/s: 3.7
    • Component/s: Backup, Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      Requisites:

      1. To use phpunit 7.5.8 or above. That can be achieved by 1) waiting MDL-65499 to be integrated or 2) remove the composer.lock file and running composer update.
      2. Windows

      Steps

      1. Under Windows, perform a complete phpunit run. Any supported database or php version is ok.
      2. Verify that there aren't errors like those shown @ https://pastebin.com/TQ6NZR67 ("Warning: unlink...", "Warning rmdir..." corresponding to tmp/backup files and dirs).

      Important note: At this stage, there could be other failures under Windows. We are, right now, completing the Moodle 3.7 release testing matrix and they will be handled there. So, at all effects, they can be ignored here. This issue is only about the (open/busy/locked) problems described above.

       

      Show
      Requisites: To use phpunit 7.5.8 or above. That can be achieved by 1) waiting  MDL-65499 to be integrated or 2) remove the composer.lock file and running composer update. Windows Steps Under Windows, perform a complete phpunit run. Any supported database or php version is ok. Verify that there aren't errors like those shown @ https://pastebin.com/TQ6NZR67 ("Warning: unlink...", "Warning rmdir..." corresponding to tmp/backup files and dirs). Important note : At this stage, there could be other failures under Windows. We are, right now, completing the Moodle 3.7 release testing matrix and they will be handled there. So, at all effects, they can be ignored here. This issue is only about the (open/busy/locked) problems described above.  
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:

      Description

      While running phpunit tests under Windows to complete the 3.7 release testing matrix it has been detected that, from a point, all test start to fail with "Invalid permissions/files locked" problems.

      Tracing down the problem, it seems that some backup tests (at very least) are not properly destroying the backup/restore controllers. That leaves files (logs, temps...) not closed.

      While that's not a problem in unix... under windows that leads to files locked so they cannot be removed as part of the standard reset process between tests, causing ALL them to fail.

      This issue is about to detect all the places where we are leaving controllers not explicitly destroyed and proceed to do it.

      Note: To reproduce this properly, ideally you should update your phpunit to current 7.5.8 or higher. There is a bug in 7.5.7 making this bug unintelligible. See linked issues.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Peer reviewer:
                Simey Lameze
                Integrator:
                Andrew Nicols
                Tester:
                Jun Pataleta
                Participants:
                Component watchers:
                Adrian Greeve, Mihail Geshoski, Peter Dias, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

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