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

Use unique sequence values on database reset to pick unit testing mistakes

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.7
    • 2.8
    • Unit tests

    Description

      MDL-43440 discovered a number of places where id was used instead of cmid.

      This worked as all the sequences start at the same number and unit tests only insert a limited set of modules. OUBlog broke that assumption and unit tests break. It is not in core and needs a better way to detect those kinds of coding errors.

      Since the initial fix in December posted in MDL-43440, there have been another 4 test creations using the incorrect data, so the issue isn't a once of issue.

      This change is to set database sequences to individual different values where possible to catch errors where we send the wrong id to a function.

      Attachments

        Issue Links

          Activity

            People

              mr-russ Russell Smith
              mr-russ Russell Smith
              Marina Glancy Marina Glancy
              Damyon Wiese Damyon Wiese
              Rajesh Taneja Rajesh Taneja
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Nov/14