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

Static caches not reset between tests and causing nightmares

XMLWordPrintable

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

      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()

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

              Created:
              Updated:

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