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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.8
    • Component/s: Unit tests
    • Labels:

      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

              Assignee:
              mr-russ Russell Smith
              Reporter:
              mr-russ Russell Smith
              Peer reviewer:
              Marina Glancy
              Integrator:
              Damyon Wiese
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14