From 3b9635dba89daa9f7b4db47961a816863d026e9b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 26 May 2010 11:26:49 +0000 Subject: - Patch #714964 by mr.baileys: ActionLoopTestCase was fragile on some databases. --- modules/simpletest/tests/actions.test | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/simpletest') diff --git a/modules/simpletest/tests/actions.test b/modules/simpletest/tests/actions.test index e88021f64..8e0220d4f 100644 --- a/modules/simpletest/tests/actions.test +++ b/modules/simpletest/tests/actions.test @@ -81,7 +81,7 @@ class ActionLoopTestCase extends DrupalWebTestCase { } /** - * Set up a loop with 10-50 recursions, and see if it aborts properly. + * Set up a loop with 3 - 12 recursions, and see if it aborts properly. */ function testActionLoop() { $user = $this->drupalCreateUser(array('administer actions')); @@ -116,10 +116,9 @@ class ActionLoopTestCase extends DrupalWebTestCase { } $expected[] = 'Stack overflow: too many calls to actions_do(). Aborting to prevent infinite recursion.'; - $result = db_query("SELECT * FROM {watchdog} WHERE type = 'actions_loop_test' OR type = 'actions' ORDER BY timestamp"); + $result = db_query("SELECT message FROM {watchdog} WHERE type = 'actions_loop_test' OR type = 'actions' ORDER BY wid"); $loop_started = FALSE; foreach ($result as $row) { - $expected_message = array_shift($expected); $this->assertEqual($row->message, $expected_message, t('Expected message %expected, got %message.', array('%expected' => $expected_message, '%message' => $row->message))); } -- cgit v1.2.3