Closed (fixed)
Project:
SimpleTest
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2008 at 23:19 UTC
Updated:
7 May 2009 at 06:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
hass commentedNo simpletest works at all any more. It shows the batch processing and than it stale. I don't know what it is doing there, but after the timeout I receive an unhelpful server 500 error. Doesn't matter if I use 60 or 240 seconds.
Comment #2
hass commented1. Uninstalled simpletest v1.2 (has no uninstall)
2. Ok, simply delete the folder
3. Reloaded modules page
4. Extracted simpletest v2.5
5. Reloaded modules page
6. Activated simpletest module
7. Gone to admin/build/testing
8. Checked the "SimpleTest" and "Run tests"
9. After 5-10 seconds batch processing it gives me the following
10. Clicked the error page link.
11. Error page telling me "The tests did not successfully finish."
Any way to get this module working?
Comment #3
boombatower commentedCan you try the latest HEAD for comparison and post your OS/server/PHP info. It works for myself and numerous others.
Comment #4
hass commentedAgain after cleanup the system table and reinstall:
batch?id=18:
Comment #5
hass commentedSame again with latest DEV
Comment #6
hass commentedComment #7
hass commentedHave simpletest module been tested with Drupal installed into a subdirectory?
Comment #8
hass commentedAny idea how I can get simpletest module working? I'd like to upgrade the googleanalytics tests, but I cannot test anything.
Comment #9
boombatower commented@7: have you tried running it in the root? I use virtual hosts and thus never run into this issue.
I believe this does occur as I have had the issue when setting up testing.drupal.org and other testing slaves.
If you can confirm that it works without running in a sub directly then this needs to be solved in core and backported.
Comment #10
hass commentedI have totally no idea where I should start searching or debugging. Also tested D7 in a subdirectory and it is also not working on my IIS 5.1 with MySQL 5.x.
Comment #11
boombatower commentedI'm just asking if you can run the tests from the webroot. The simplest way may be to move the webroot to your D6 installation.
Comment #12
hass commentedI tried a brand new installation of D7 in web root. No success. Have this been tested under Windows? I will try in xampp environment asap.
Comment #13
boombatower commentedI thoughts it had, but less common for sure.
Comment #14
hass commentedInstalled D6 into XAMPP Lite - works. Are there any known IIS issues or are you using Apache specific logics or variables? I have also tried without clean_url to verify if there is an issue with ISAPI_Rewrite, but it also haven't worked with clean_url's disabled on IIS.
Comment #15
boombatower commentedThe only possibility that I know of would be
Comment #16
hass commentedOnly as a side note - I've taken a look to the simpltest table and when the tests started I see ~800 exceptions not related to the modules test I'm currently running. All seems to be related to locale module and locale tables. After I've disabled the locale module and all depended modules all this exceptions are gone. I think this is part of the issue as I saw some tests are running out of time (240sec). This is from my Apache tests... I have had locale module, i18n, content translation and some others installed.
Comment #17
hass commentedOh my goodness! Now all works in IIS, too.
Sooo... there is a bug together with locale module enabled!
Comment #18
boombatower commentedThis module has been tested quiet a bit and is almost identical to HEAD, so if you find an issue it is most likely not related or should appear in HEAD as well.
Comment #19
hass commentedMaybe the title is not yet correct, but there is a bug in the module. Try to find why there are ~800+
_query()exceptions with locale module what causes the batch to timeout and server 500 errors.Comment #20
hass commentedHere is a dump from the two main simpletest tables + all temp simpletest tables from one run. If I'm running the google analytics test it completes and if I run the simpletest functionality test it crashes after some time. In the attached file you can see I have re-enabled the locale module before my latest tests.
From the errors I see something strange. All simpletest tables that are created (not to mention that there are tables missing) have a prefix simpletest155897, but locale module errors in "simpletest" table are showing exceptions with simpletest886421 prefix. And to make it more worse - latest inserts (id 355+) are showing simpletest155897 prefix again. All tables are from one run and there wasn't any stale data or tables from a prior run.
Setting back to active and I hope this don't need additional info as it is 100% reproduceable.
Comment #21
hass commentedI may found the source of the timeout issue.
If I call "/" I have an endless loop on my test site. This is caused by a bug in i18n module or language detection bug in locale module or both together. This causes an endless loop in the simpletest that never finishes if
$this->drupalGet('');is called. Firefox finishes after 20 redirects with an "endless redirect warning message", but simpletest not.Have CURL also such a feature like FF have?
Comment #22
hass commentedThis patch change curl to stop processing after 20 redirects. This may happen if you have an endless loop on the tested site. I've taken this limit from Firefox that also have an endless redirect detection and stops processing after 20 redirects. As this 20 redirects will take some good time to complete - a 90 seconds PHP timeout limit is not enough and I've added a timeout of 240 seconds what core and other modules also do in such situations.
Nevertheless it would be much better if simpletest would use proper batch processing and encapsulate every time consuming task (drupal_install_system, drupal_install_modules, rebuild caches and *every* test - not only one batch per .test file) in it's own batch process.
Comment #23
hass commentedMissed the patch.
Comment #24
boombatower commentedStopping at 20 may screw up the redirect one...as when testing a batch API form it may redirect hundreds of time validly. Either way this should be fixed in D7 core and backported.
Personally I'm not sure that adding a limit is a good idea for the reason above specifically.
Comment #25
hass commentedI understand this redirection limit as a setting per execute. So every time you call curl execute you can have up to 20 redirects. Therefore this is only a stopper for endless loops - not for batch API at all... so no work here...
Comment #26
boombatower commentedPlease provide a 7.x version of the patch and mark the issue as CNR so that the testing bot will run it through its phases, otherwise I believe what you said in #25 makes sense since batch API uses meta refresh which the SimpleTest browser searches for and redirects through another drupalGet call.
If curl was performing the redirects then it would stop the batch API as it normally uses JavaScript which obviously SimpleTest does not evaluate.
Comment #27
shaikafrose commentedComment #28
hass commentedPatch attached.
Comment #29
dries commentedI'm cool with the CURL option but the 240s timeout value seems very random to me. Can't we just go with the CURL option? It is much more portable.
Comment #30
hass commentedI can also set the timeout myself in PHP settings file, but for me it times out today with 90s and 240s not. 240s was a value that is already used in node.module, common.inc, locale.inc, devel, and some other modules. It's a high limit, but it's better then 0 what could hang up the PHP process for ages.
Comment #31
hass commentedComment #32
hass commentedComment #33
hass commentedSomething goes wrong here... my comments are missing...
I have removed the time-out limit and reduced the redirection limit to 5 as 20 seems to be useless to me and is also too much. Use the patch in #32, please.
Comment #34
dries commentedCommitted to CVS HEAD. Thanks.
Comment #35
hass commentedTHX, needs backport.
Comment #36
hass commentedMoving to simpletest issue queue
Comment #37
boombatower commented2.8 is a fresh backport.