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

editpdf unit test failure under windows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 2.9
    • Unit tests

    Description

      This is consistently failing under windows:

      $ vendor/bin/phpunit  assignfeedback_editpdf_testcase mod/assign/feedback/editpdf/tests/editpdf_test.php
       
      Moodle 2.9beta+ (Build: 20150424), mysqli, d5d23acdf546ab33a052ad06869d8d65f038b666
      PHPUnit 3.7.38 by Sebastian Bergmann.
       
      Configuration read from C:\Users\stronk7\git_moodle\integration\phpunit.xml
       
      ..EE
      Warning: unlink(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/combined/2043f056dba6b8e2203ef672a9f7064efc800410/combined.pdf): Permission denied in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8782
       
      Warning: rmdir(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/combined/2043f056dba6b8e2203ef672a9f7064efc800410): Directory not empty in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8791
       
      Warning: rmdir(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/combined): Directory not empty in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8791
       
      Warning: unlink(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/src-4e88c5e76e1e511bc9bacebdad5b1c0a0270b20a.pdf): Permission denied in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8782
       
      Warning: unlink(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/src-9866f219a397fa8ffef8e9a6413fa89b25cc17b1.pdf): Permission denied in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8782
       
      Warning: rmdir(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf): Directory not empty in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8791
       
      Warning: rmdir(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp): Directory not empty in C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php on line 8791
       
       
      Time: 32.38 seconds, Memory: 65.25Mb
       
      There were 2 errors:
       
      1) assignfeedback_editpdf_testcase::test_document_services
      unlink(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/combined/2043f056dba6b8e2203ef672a9f7064efc800410/combined.pdf): Permission denied
       
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8782
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8780
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8780
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8780
      C:\Users\stronk7\git_moodle\integration\lib\testing\classes\util.php:728
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\util.php:243
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:107
       
      To re-run:
       c:/Users/stronk7/git_moodle/integration/vendor/phpunit/phpunit/composer/bin/phpunit assignfeedback_editpdf_testcase mod\assign\feedback\editpdf\tests\editpdf_test.php
       
      2) assignfeedback_editpdf_testcase::test_create_instance
      unlink(C:\Users\stronk7\moodledata\integration\master\mysql_phpunit/temp/assignfeedback_editpdf/combined/2043f056dba6b8e2203ef672a9f7064efc800410/combined.pdf): Permission denied
       
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8782
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8780
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8780
      C:\Users\stronk7\git_moodle\integration\lib\moodlelib.php:8780
      C:\Users\stronk7\git_moodle\integration\lib\testing\classes\util.php:728
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\util.php:243
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:107
       
      To re-run:
       c:/Users/stronk7/git_moodle/integration/vendor/phpunit/phpunit/composer/bin/phpunit assignfeedback_editpdf_testcase mod\assign\feedback\editpdf\tests\editpdf_test.php
       
      FAILURES!
      Tests: 4, Assertions: 22, Errors: 2.
      

      It seems that, after a point, some file is being left open/busy, so phpunit reset stops working (cannot delete).

      Note this only happens for master (2.9beta+ right now). Same test against 28_STABLE passes ok.

      Ciao

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Rajesh Taneja Rajesh Taneja
              David Monllaó David Monllaó
              Adrian Greeve Adrian Greeve
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15