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

random failures in course externallib test

    XMLWordPrintable

    Details

      Description

      Course externallib tested introduced by MDL-33995 fail randomly because they expect get_records() and friends without ORDER BY return consistent results, this caused test_get_courses() to fail randomly.

              $courses = core_course_external::get_courses(array('ids' =>
                  array($course1->id, $course2->id)));
       
              // Check we retrieve the good total number of categories.
              $this->assertEquals(2, count($courses));
       
              // Check the return values for course 1
              $dbcourse = $DB->get_record('course', array('id' => $course1->id));
              $this->assertEquals($courses[0]['id'], $dbcourse->id);

      ORder of courses in $courses variable is not guaranteed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Nov/12