Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.74
diff -u -r1.74 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	13 Dec 2008 14:03:21 -0000	1.74
+++ modules/simpletest/drupal_web_test_case.php	15 Dec 2008 11:16:22 -0000
@@ -781,6 +781,11 @@
   protected function setUp() {
     global $db_prefix;
 
+    // If not in 'safe mode', increase the maximum execution time:
+    if (!ini_get('safe_mode')) {
+      set_time_limit(240);
+    }
+
     // Store necessary current values before switching to prefixed database.
     $this->originalPrefix = $db_prefix;
     $clean_url_original = variable_get('clean_url', 0);
@@ -907,6 +912,7 @@
         CURLOPT_COOKIEJAR => $this->cookieFile,
         CURLOPT_URL => $base_url,
         CURLOPT_FOLLOWLOCATION => TRUE,
+        CURLOPT_MAXREDIRS => 20,
         CURLOPT_RETURNTRANSFER => TRUE,
         CURLOPT_SSL_VERIFYPEER => FALSE,  // Required to make the tests run on https://
         CURLOPT_SSL_VERIFYHOST => FALSE,  // Required to make the tests run on https://
