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

Random failure in the competencies unittest

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Competencies
    • Labels:
    • Affected Branches:
      MOODLE_31_STABLE

      Description

      Picked by Travis in MDL-36234 and MDL-54034
      See https://travis-ci.org/junpataleta/moodle/jobs/126550328
      https://travis-ci.org/FMCorz/moodle/jobs/127715823

      There was 1 failure:
       
      1) core_competency_external_testcase::test_list_plan_competencies
      Failed asserting that 200004 matches expected 200000.
       
      /home/travis/build/junpataleta/moodle/competency/tests/external_test.php:1558
      /home/travis/build/junpataleta/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit core_competency_external_testcase competency/tests/external_test.php
      

      Comment from Fred:

      I'm guessing that's due to a random ordering when the sortorder field is duplicated. We should fallback on ordering by ID to avoid random results in Unit Tests. I've fixed similar bugs recently in 0abaf33 IIRC.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fred Frédéric Massart
              Reporter:
              marina Marina Glancy
              Participants:
              Component watchers:
              Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: