Index: modules/simpletest/tests/actions.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/actions.test,v
retrieving revision 1.11
diff -u -r1.11 actions.test
--- modules/simpletest/tests/actions.test	10 Nov 2009 17:27:53 -0000	1.11
+++ modules/simpletest/tests/actions.test	5 Jan 2010 12:33:04 -0000
@@ -98,19 +98,24 @@
 
     // Clear the log again for another test, this time with a random maximum.
     db_delete('watchdog')->execute();
-    variable_set('actions_max_stack', mt_rand(10, 50));
+    variable_set('actions_max_stack', mt_rand(3, 12));
     $this->triggerActions();
   }
 
   /**
    * Create an infinite loop by causing a watchdog message to be set,
-   * which causes the actions to be triggered again, up to default of 35 times.
+   * which causes the actions to be triggered again, up to actions_max_stack 
+   * times.
    */
   protected function triggerActions() {
     $this->drupalGet('<front>', array('query' => array('trigger_actions_on_watchdog' => TRUE)));
     $expected = array();
     $expected[] = 'Triggering action loop';
-    for ($i = 1; $i <= variable_get('actions_max_stack', 35); $i++) {
+    // To prevent this test from failing when xdebug is enabled, the maximum
+    // recursion level should be kept low enough to prevent the xdebug
+    // infinite recursion protection mechanism from aborting the request.
+    // See http://drupal.org/node/587634 for additional information.
+    for ($i = 1; $i <= variable_get('actions_max_stack', 10); $i++) {
       $expected[] = "Test log #$i";
     }
     $expected[] = 'Stack overflow: too many calls to actions_do(). Aborting to prevent infinite recursion.';
