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

random failures in course externallib test

XMLWordPrintable

      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.

            jerome Jérôme Mouneyrac
            skodak Petr Skoda
            Rossiani Wijaya Rossiani Wijaya
            Sam Hemelryk Sam Hemelryk
            Tim Barker Tim Barker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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