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

Errors with core_backup_cleanup_task_testcase under Windows

    XMLWordPrintable

    Details

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

      It's enough to get the tests @ ci.moodle.org passing, so let CiBoT to do so.

      The windows-travis run below in the issue show how the fix is causing the test to pass ok. If you've a Windows host at hand... just:

      1. run vendor/bin/phpunit --filter core_backup_cleanup_task_testcase
      2. verify the it passes.

      If you don't have windows at hand, no worries... a bunch of Windows tests are going to be run to complete the Moodle 3.11 release testing matrix, and for sure we'll know there if this is fixed.

      Show
      It's enough to get the tests @ ci.moodle.org passing, so let CiBoT to do so. The windows-travis run below in the issue show how the fix is causing the test to pass ok. If you've a Windows host at hand... just: run vendor/bin/phpunit --filter core_backup_cleanup_task_testcase verify the it passes. If you don't have windows at hand, no worries... a bunch of Windows tests are going to be run to complete the Moodle 3.11 release testing matrix , and for sure we'll know there if this is fixed.
    • Affected Branches:
      MOODLE_311_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-71367_311
    • Pull Master Branch:

      Description

      Just run a complete phpunit here against Moodle 3.11dev+ and got these 2 new errors:

      2) core_backup_cleanup_task_testcase::test_backup_cleanup_task_deletes_records
      rmdir(C:\Users\stronk7\moodledata\integration_phpunit/temp/backup): Directory not empty
       
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:9793
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:9782
      C:\Users\stronk7\git_moodle\integration\lib\testing\classes\util.php:792
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\util.php:266
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:534
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:114
       
      3) core_backup_cleanup_task_testcase::test_backup_cleanup_task_deletes_files
      unlink(C:\Users\stronk7\moodledata\integration_phpunit/temp/backup/5436f391b55a70cee61f90afd580b101.log): Permission denied
       
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:9784
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:9782
      C:\Users\stronk7\git_moodle\integration\lib\testing\classes\util.php:792
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\util.php:266
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:534
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:100
      

      These problems use to happen when some file has been left unclosed under Windows and that prevents any write/remove operation on them.

      Haven't checked what happens in 3.10.x or older, the problems didn't exist on 3.10.0 release but maybe now they do. Please check.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Andrew Lyons Andrew Lyons
              Integrator:
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Tester:
              CiBoT CiBoT
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Andrew Lyons, Dongsheng Cai, Huong Nguyen, 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:
                17/May/21

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 42 minutes
                  42m