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

Error in random_question_loader_test tests for draft state

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.3.5, 4.4.1
    • 4.3.4
    • Questions

      The array structure of the filter conditions created in test_questions_with_later_draft_version_is_returned and test_draft_questions_not_returned is wrong, leading to failures if CodeRunner is installed:

      Moodle 4.3.4 (Build: 20240422), 9be544392f69495a4ccd8412694b5777f06157ce
      Php: 8.2.12, ou_pgsql: 14.4, OS: Windows NT 10.0 AMD64
      PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
       
      ......FF..........................                                34 / 34 (100%)
       
      Time: 00:56.107, Memory: 446.00 MB
       
      There were 2 failures:
       
      1) core_question\random_question_loader_test::test_draft_questions_not_returned
      Failed asserting that 16 is null.
       
      C:\Users\tjh238\workspace\ou-moodle2\question\tests\random_question_loader_test.php:145
      C:\Users\tjh238\workspace\ou-moodle2\lib\phpunit\classes\advanced_testcase.php:81
       
      2) core_question\random_question_loader_test::test_questions_with_later_draft_version_is_returned
      Failed asserting that 7 matches expected 112000.
       
      C:\Users\tjh238\workspace\ou-moodle2\question\tests\random_question_loader_test.php:172
      C:\Users\tjh238\workspace\ou-moodle2\lib\phpunit\classes\advanced_testcase.php:81
       
      FAILURES!
      Tests: 34, Assertions: 78, Failures: 2.
      

            timhunt Tim Hunt
            timhunt Tim Hunt
            Anupama Sarjoshi Anupama Sarjoshi
            Huong Nguyen Huong Nguyen
            Raquel Ortega Raquel Ortega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 31 minutes
                5h 31m

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