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

Windows PHPUnit failures (isolation tests)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.2.3, 4.3, 4.4
    • Unit tests
    • None
    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE

      It seems that the last week roll (20231027) has come with some changes that are causing Windows PHPUnit to fail consistently.

      Affected branches are 402, 403 and master.

      Example link: https://github.com/stronk7/moodle/actions?query=branch%3Agha_windows_402

      Output:

      There were 3 errors:
       
      1) core\setuplib_test::test_require_phpunit_isolation_isolated
      coding_exception: Coding error detected, it must be fixed by a programmer: When including this file for a unit test, the test must be run in an isolated process. See the PHPUnit @runInSeparateProcess and @runTestsInSeparateProcesses annotations.
       
      D:\a\moodle\moodle\lib\setuplib.php:2204
      D:\a\moodle\moodle\lib\tests\setuplib_test.php:543
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:81
       
      2) core_external\util_test::test_format_text
      coding_exception: Coding error detected, it must be fixed by a programmer: When including this file for a unit test, the test must be run in an isolated process. See the PHPUnit @runInSeparateProcess and @runTestsInSeparateProcesses annotations.
       
      D:\a\moodle\moodle\lib\setuplib.php:2204
      D:\a\moodle\moodle\lib\externallib.php:35
      D:\a\moodle\moodle\lib\external\tests\util_test.php:54
      D:\a\moodle\moodle\lib\external\tests\util_test.php:254
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:81
       
      3) core_external\util_test::test_external_format_string
      coding_exception: Coding error detected, it must be fixed by a programmer: When including this file for a unit test, the test must be run in an isolated process. See the PHPUnit @runInSeparateProcess and @runTestsInSeparateProcesses annotations.
       
      D:\a\moodle\moodle\lib\setuplib.php:2204
      D:\a\moodle\moodle\lib\externallib.php:35
      D:\a\moodle\moodle\lib\external\tests\util_test.php:54
      D:\a\moodle\moodle\lib\external\tests\util_test.php:357
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:81
      

      My personal bet is that this may be a regression of MDL-79637, because I day before it... the tests were passing (I used them to test another issue).

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

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