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

Errors with core_backup_cleanup_task_testcase under Windows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.11, 4.0
    • 3.11
    • Backup, Unit tests
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-71367_311
    • 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.

    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

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              CiBoT CiBoT
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/21

                Time Tracking

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