summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-12-15 11:17:22 -0800
committerBharat Mediratta <bharat@menalto.com>2010-12-15 11:17:22 -0800
commit587284ab38a78580c4ce83735fb563aa9951e701 (patch)
treedab9cbb2fe785f42b2a5a52014147a42ca36b75b /modules
parent79740a2c77ad5c9b048e094cc164fd0129aba16a (diff)
Move the test time limit code into Unit_Test since some parts of the
code (like ORM_MPTT) mess with the time limit which interferes with the overall time limit set in Gallery_Unit_Test_Controller.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery_unit_test/controllers/gallery_unit_test.php1
-rw-r--r--modules/unit_test/libraries/Unit_Test.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php
index c4a891ba..e241e1dd 100644
--- a/modules/gallery_unit_test/controllers/gallery_unit_test.php
+++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php
@@ -132,7 +132,6 @@ class Gallery_Unit_Test_Controller extends Controller {
graphics::choose_default_toolkit();
$filter = count($_SERVER["argv"]) > 2 ? $_SERVER["argv"][2] : null;
- set_time_limit(300);
print new Unit_Test($modules, $filter);
} catch (ORM_Validation_Exception $e) {
print "Validation Exception: {$e->getMessage()}\n";
diff --git a/modules/unit_test/libraries/Unit_Test.php b/modules/unit_test/libraries/Unit_Test.php
index 46a926d8..253d6fb6 100644
--- a/modules/unit_test/libraries/Unit_Test.php
+++ b/modules/unit_test/libraries/Unit_Test.php
@@ -185,6 +185,8 @@ class Unit_Test_Core {
$e = null;
try {
+ // Enforce a time limit
+ set_time_limit(30);
// Run the actual test
$object->$method_name();