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

Time-out problem in unit tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.6, 2.4.3, 2.5
    • Fix Version/s: 2.3.7, 2.4.4
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      1. Run the unit tests on a very slow computer. Verify that they don't crash out in the middle.

      (I have already done this!)

      From Petr's comments below:

      2. Uncomment the //$warning and you will get problems in stats, extlib course duplication and assignment upgrade code - all those places do change timeouts. (and means code is being executed ok).

      Show
      1. Run the unit tests on a very slow computer. Verify that they don't crash out in the middle. (I have already done this!) From Petr's comments below: 2. Uncomment the //$warning and you will get problems in stats, extlib course duplication and assignment upgrade code - all those places do change timeouts. (and means code is being executed ok).
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      I am seeing failures during the unit tests:

      PHP Fatal error: Maximum execution time of 300 seconds exceeded in C:\Users\tjh238\workspace\moodle_head\lib\moodlelib.php on line 10745

      As far as I can work out, what is going on is this:

      1. Some code somewhere calls set_time_limit supposedly to avoid time-outs.
      2. If the tests run fast enough, then there is no problem, but if your computer is slow, then some time later the tests time-out on an unrelated test.

      I think we should add code to reset_all_data to detect changes in max_execution_time, and report them as errors.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Peer reviewer:
              Petr Skoda
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/13