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

Random failure on "An automatic forum lists all subscribers" scenario


      This scenario has been failing randomly but in a different way, it usually fails on the first run and passes on the following re-runs but it can fail on the reruns as well, see the following build for instance:

      Even though it doesn't appear on the list of failures, this random has been happening a lot and causing unnecessary Behat re-runs.

      This failure doesn't seem to be browser/database relevant and it happens on all versions.

      Console output

      002 Scenario: An automatic forum lists all subscribers # /var/www/html/mod/forum/tests/behat/forum_subscriptions_availability.feature:92
            Then I should see "Student 1"                    # /var/www/html/mod/forum/tests/behat/forum_subscriptions_availability.feature:95
              "Student 1" text was not found in the page (Behat\Mink\Exception\ExpectationException)

      Root Cause

      The forum subscriptions class caches forum and subscription information in a static php cache on the class. When multiple tests are run in the same process the cache was not being reset properly.

      This only happens in cases where the subscription data is set in the Behat process because the actual run is a separate set of processes for each run. When we create test data we do so in the same behat process all along, which can lead to cache bleed where caches are not reset between tests.

            dobedobedoh Andrew Lyons
            lameze Simey Lameze
            Angelia Dela Cruz Angelia Dela Cruz
            Simey Lameze Simey Lameze
            Kim Jared Lucas Kim Jared Lucas
            0 Vote for this issue
            10 Start watching this issue


                Original Estimate - Not Specified
                Not Specified
                Remaining Estimate - 0 minutes
                Time Spent - 1 day, 2 hours, 29 minutes
                1d 2h 29m

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