Closed (fixed)
Project:
SimpleTest
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
27 Mar 2008 at 22:35 UTC
Updated:
12 Apr 2008 at 21:51 UTC
Jump to comment: Most recent file
When running multiple test functions within a class something isn't working correctly so that test fails horribly. If the test functions are run individual everything works. I'm guessing this is why most the tests fail, as they used to work.
This is a very hard to catch/debug error. Chx and I have been trying to figure this out with little luck.
So far the only thing I can confirm is that if setUp and the db_prefix portion of tearDown are commented out the tests work.
From the our best reasoning chx and I believe this has to do with a caching issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | simpletest_db_prefix.patch | 1 KB | boombatower |
Comments
Comment #1
moshe weitzman commentedWe should consider running all tests with the batch API. This will prevent out of memory errors as well ( thats what i got when i ran all tests from within drush)
Comment #2
boombatower commented@moshe weitzman: Looks like a possibility. This doesn't fix the db_prefixing issue, but could prove useful. If you would write a patch that would be great.
@all: Batch API Documentation
Comment #3
boombatower commentedAfter allot of time spent debugging this (and tearing out hair) I have discovered what I believe to be the issue.
$this->_modulesarray wasn't being reset and thus wasn't enabled repeat modules in the second test function. This, as you can imagine, creates havoc.The above was fixed with the addition of the following code:
Although the fix is quiet simple, coming to this conclusion took many hours of painstaking debugging. Now that this is fixed SimpleTest should be able to reliably flush the database after each test function has run and I can move on the clean out the issue queue.
Comment #4
moshe weitzman commentedvery nice detective work, boombatower. thanks.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.