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

"Time limit expires" scenario randomly fails on Goutte

    XMLWordPrintable

    Details

      Description

      This Behat scenario should be working fine even without the "@javascript" tag. However, for some reason, removing the "@javascript" tag causes random failures.

      Also, the run time of this scenario is unnecessarily long and can be further shortened by directly setting "$CFG->maxediting" time to "1 second" using the "the following config values are set as admin:" step. This will enable the user to simply wait for 2 seconds after creating the discussion in order to quickly verify the editing expiry and will greatly decrease the test execution time.

      To reproduce:

      1. Apply the patch in this issue (e.g. in master)

        git checkout master && git pull git://github.com/junpataleta/moodle.git MDL-67778-master
        

      2. Initialise Behat
      3. Download behattest.sh to your moodle root folder. It's a script that repeatedly runs the "Time limit expires" scenario for 100 times.
      4. Go to your moodle root folder and make it executable

        chmod +x behattest.sh
        

      5. Run the "behattest.sh"

        ./behattest.sh
        

      6. Expected
        • All tests should pass up to the 100th iteration.
      7. Actual
        • The Behat test randomly fails.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jpataleta Jun Pataleta
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m