diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php index 440633113fd..8fde7a9e4f6 100644 --- a/lib/phpunit/classes/util.php +++ b/lib/phpunit/classes/util.php @@ -607,13 +607,16 @@ class phpunit_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