From 70faad655a41acabc5fb8885c2035194d530820e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Tue, 9 Apr 2013 23:48:59 +0200 Subject: [PATCH] MDL-38912 fix incorrect timeout reset --- lib/phpunit/classes/util.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php index dbe1980c53b..4fcfda4e22e 100644 --- a/lib/phpunit/classes/util.php +++ b/lib/phpunit/classes/util.php @@ -140,13 +140,16 @@ class phpunit_util extends testing_util { $warnings[] = 'Warning: unexpected change of $COURSE'; } - if (ini_get('max_execution_time') != 0) { - // TODO un-comment this warning, once we have fixed the test - // failures that it causes. - // $warnings[] = 'Warning: max_execution_time was changed.'; - // See MDL-38989 for details. - set_time_limit(0); - } + } + + if (ini_get('max_execution_time') != 0) { + // This is special warning for all resets because we do not want any + // libraries to mess with timeouts unintentionally. + // Our PHPUnit integration is not supposed to change it either. + + // TODO: MDL-38912 uncomment and fix all + somehow resolve timeouts in failed tests. + //$warnings[] = 'Warning: max_execution_time was changed.'; + set_time_limit(0); } // restore original globals