- Patch #320374 by Damien Tournoud, pwolanin et al: worked around a max_allowed_packet size issue with the simpletests.
--- includes/form.inc 2008/10/14 11:01:08 1.296
+++ includes/form.inc 2008/10/15 14:17:26 1.297
@@ -2544,8 +2544,8 @@
* Unless the batch has been marked with 'progressive' = FALSE, the function
* issues a drupal_goto and thus ends page execution.
*
- * This function is not needed in form submit handlers; Form API takes care
- * of batches that were set during form submission.
+ * This function is generally not needed in form submit handlers;
+ * Form API takes care of batches that were set during form submission.
*
* @param $redirect
* (optional) Path to redirect to when the batch has finished processing.
--- modules/simpletest/simpletest.module 2008/10/14 20:44:57 1.20
+++ modules/simpletest/simpletest.module 2008/10/15 14:17:27 1.21
@@ -337,6 +337,13 @@
'init_message' => t('SimpleTest is initializing...') . ' ' . format_plural(count($test_list), "one test case will run.", "@count test cases will run."),
);
batch_set($batch);
+ // Normally, the forms portion of the batch API takes care of calling
+ // batch_process(), but in the process it saves the whole $form into the
+ // database (which is huge for the test selection form).
+ // By calling batch_process() directly, we skip that behavior and ensure
+ // that we don't exceed the size of data that can be sent to the database
+ // (max_allowed_packet on MySQL).
+ batch_process();
}
/**