Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2008 at 22:47 UTC
Updated:
29 Oct 2008 at 14:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedImproved version, with more comments.
Comment #2
damien tournoud commentedpwolanin suggested a better wording.
Comment #3
pwolanin commentedtested. Prevents the WSOD from adding more test classes. Tests still run as expected.
Comment #4
mfer commentedAs one of the people who experienced this problem I'm glad for this patch. Like pwolanain I tested and verified it works as expected.
@Damien Tournoud thanks for the fix.
Comment #5
damien tournoud commentedI confirm that the full suite ran with max_allowed_packet = 1M, flawlessly.
Comment #6
dries commentedI think we should make the code comments better still. We don't explain why we call batch_process().
Comment #7
pwolanin commented@Dries - did you look at the comments in #2?
Comment #8
dries commentedYes, I don't think they are sufficiently explanatory. In fact, I think the comments in #1 were more specific. Let's take another pass at the comments! :)
Comment #9
pwolanin commentedok, here's another try.
Comment #10
dries commentedI'm still not sure I understand this patch, and the code comments still don't help me. Sorry. I'll have to start digging the code first so I fully understand this before I can review this properly. Until then, this is a bit fishy.
Comment #12
damien tournoud commentedOne last try.
Comment #13
mfer commented@Dries - MAMP, xampp, and other setups come with mysql configured to max_allowed_packet = 1M. The simpletest form ($form) has reached a point where it is really really large. Normally, when batch_set() is called in a form submit handler (in this case simpletest_test_form_submit() through simpletest_run_tests()) drupal_process_form() makes sure batch_process() is called. But, before drupal_process_form() executes batch_process() it adds the entire form array to the batch that is stored in the database. In this case the form that is stored in the database causes the $batch to be larger then 1M so an exception is thrown and execution is stopped.
By adding batch_process() in simpletest_run_tests() we set the batch processing into motion without the full simpletest form being added the batch so the form is not stored in the database.
It is a special case for the simpletest form because it is so large.
Does this explanation help?
Comment #14
damien tournoud commentedHeine spotted a grammar error.
Comment #15
mfer commentedWe should avoid mysql specific references. This problem could come up in a different database engine. Can this be rephrased in more general terms.
Comment #16
damien tournoud commented@mfer: please read the patch. It *is* phrased in general terms.
Comment #17
mfer commentedThe last line refers to mysql and a mysql setting. That's not general.
Comment #18
damien tournoud commented@mfer, thanks for your review... but (1) MySQL is mentioned only in the last line, after a general explanation has been made; and (2) that issue only occurs on MySQL as far as we know.
Comment #19
mfer commentedI did some checking. Of the major databases (mysql, postgresql, oracle, mssql) my understanding is that this will only affect mysql.
Comment #20
dries commentedThanks for clarifying. That helps. I committed the patch to CVS HEAD. Thanks.
Comment #21
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.