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

Fragile unit test test_deprecated_course_module_instances_list_viewed_events

XMLWordPrintable

      If you have a plugin that loads a list of all events before running test_deprecated_course_module_instances_list_viewed_events, then this test fails.

      E.g. in my case a plugin loads a list of all events to pass to its setting in settings.php. This fails core unit tests:

      root@6548f6ade27a:/var/www/moodle45# vendor/bin/phpunit --stop-on-failure --testsuite=core_testsuite
      Moodle 4.5.2+ (Build: 20250214), 4f67063e82a9335f3424243245a886132cc08820
      Php: 8.1.29, pgsql: 16.0 (Debian 16.0-1.pgdg120+1), OS: Linux 6.8.0-52-generic x86_64
      PHPUnit 9.6.18 by Sebastian Bergmann and contributors.
       
      .............................................................   61 / 5690 (  1%)
      .............................................................  122 / 5690 (  2%)
      .............................................................  183 / 5690 (  3%)
      .............................................................  244 / 5690 (  4%)
      .............................................................  305 / 5690 (  5%)
      .............................................................  366 / 5690 (  6%)
      .............................................................  427 / 5690 (  7%)
      .............................................................  488 / 5690 (  8%)
      .............................................................  549 / 5690 (  9%)
      .............................................................  610 / 5690 ( 10%)
      .............................................................  671 / 5690 ( 11%)
      .............................................................  732 / 5690 ( 12%)
      .............................................................  793 / 5690 ( 13%)
      .............................................................  854 / 5690 ( 15%)
      ...................................S.........................  915 / 5690 ( 16%)
      .............................................................  976 / 5690 ( 17%)
      ............................................................. 1037 / 5690 ( 18%)
      ............................................................. 1098 / 5690 ( 19%)
      ............................................................. 1159 / 5690 ( 20%)
      ............F
       
      Time: 05:26.326, Memory: 274.30 MB
       
      There was 1 failure:
       
      1) core\event\deprecated_test::test_deprecated_course_module_instances_list_viewed_events
      Expectation failed, debugging() not triggered.
       
      /var/www/moodle45/lib/phpunit/classes/advanced_testcase.php:293
      /var/www/moodle45/lib/tests/event/deprecated_test.php:39
      /var/www/moodle45/lib/phpunit/classes/advanced_testcase.php:76
       
      FAILURES!
      Tests: 1172, Assertions: 23313, Failures: 1, Skipped: 1.
      
      

            dmitriim Dmitrii Metelkin
            dmitriim Dmitrii Metelkin
            Tomo Tsuyuki Tomo Tsuyuki
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 59 minutes
                59m

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