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

behat_base::spin could be improved to allow micro sleep

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Check that the behat tests pass as normal.
      The new functionality can't be tested in core presently, if you are very eager you could run the behat tests I have for MDL-31830

      Show
      Check that the behat tests pass as normal. The new functionality can't be tested in core presently, if you are very eager you could run the behat tests I have for MDL-31830
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      41988-26

      Description

      While working on course management behat tests I had a need to use spin.
      I found there was one limitation, it uses sleep so the min wait time is 1s.
      I needed to watch for a DOM change that would last for just 1s and as such came up with this modification.

      Really it will allow us to tweak for performance more easily at a later date and at the same time also adds the ability to switch a closure for an array that maps to a class method to be called instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              samhemelryk Sam Hemelryk
              Peer reviewer:
              David Monllaó
              Integrator:
              Marina Glancy
              Tester:
              Frédéric Massart
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13