- Patch #320374 by Damien Tournoud, pwolanin et al: worked around a max_allowed_packet size issue with the simpletests.

merge-requests/26/head
Dries Buytaert 2008-10-15 14:17:27 +00:00
parent 305d14412c
commit e85187d948
2 changed files with 9 additions and 2 deletions

View File

@ -2544,8 +2544,8 @@ function batch_set($batch_definition) {
* 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.

View File

@ -337,6 +337,13 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') {
'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();
}
/**