-
Improvement
-
Resolution: Fixed
-
Minor
-
2.5
-
None
-
MOODLE_25_STABLE
-
MOODLE_25_STABLE
-
w15_
MDL-38989_m25_ttfinal -
Callign set_time_limit or changing max_execution_time in library code is dangerous.
Suppose some part of cron calls a function that does that. (Cron normally runs form the command line with no time limit.) Then, randomly, some later part of cron may time out. That is bad.
(Of course, there are some parts of Moodle, like backup and restore, which do legitimately need to call set_time_limit, but they should be the exception, and the set_time_limit calls should be in the UI layer.)
Anyway, because of this danger, the unit tests should complain if they detect that the max_execution_time has changed. (At the moment they just set it back to 0. See MDL-38912.) But before we can do that, we need to fix the places (currently three) where warning about this causes the unit tests to fail.
The necessary code to display the warning is in lib/phpunit/classes/util.php, but commented out. Just search for this issue number.
- Testing discovered
-
MDL-38912 Time-out problem in unit tests
-
- Closed
-