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

Mixed uses of behat::get_timeout() stuff

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.5.16, 3.8.7, 3.9.4, 3.10.1, 3.11, 4.0
    • None
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      While reviewing MDL-66979 it was detected that all the behat:get_timeout() family of functions are expected to be seconds.

      In the other side, web drivers like the times in miliseconds.

      Hence, codebase is plagued with calls like this (just a example):

      $this->getSession()->wait(self::get_timeout() * 1000, self::PAGE_READY_JS);

      But this is tricky and easy so forget, because there are also calls like this:

      $this->getSession()->wait(self::get_timeout(), self::PAGE_READY_JS);

      So we are just passing a few miliseconds sometimes!

      So, this issue is about to:

      1. Review that all uses are consistent.
      2. Consider if, maybe we should change to miliseconds by default.
      3. Consider if we should add some protection so, for example, if we continue using seconds and 30000 is passed something is wrong or, if we decide to change to miliseconds and only 100 are passed, then something is also wrong. This would help to detect bad uses in the future

      Ciao

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

              Created:
              Updated:

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