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

Errors with core_backup_cleanup_task_testcase under Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.11
    • 3.11, 4.0
    • Backup, Unit tests
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • 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.

      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.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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