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

Static caches not reset between tests and causing nightmares

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.4.5, 3.5, 3.6
    • None
    • Unit tests
    • None
    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE

    Description

      There are a number of static caches, within some functions that aren't reset ever between tests. And it makes tests to fail @ distance, really hard to find.

      Last example happened @ MDL-63522, where the forum_tp_count_forum_unread_posts() cache was leading to a failure minutes later in the run.

      So, we should review some of those statics and ensure that one of this happens:

      1) or we ensure that we are reseting them as part of the testing reset.

      2) or we move them to use MUC caches (that are automatically reset already).

      Looking for that issue above at least 2 static caches were detected and should be checked and fixed with any of 1) or 2) above:

      • forum_tp_count_forum_unread_posts()
      • check_user_preferences_loaded()

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stronk7 Eloy Lafuente (stronk7)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: