Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
20 May 2008 at 20:05 UTC
Updated:
8 Jul 2008 at 22:13 UTC
Jump to comment: Most recent file
This issue has been run into multiple times and even discussed several times with nothing done about it.
Internal Drupal functions like xmlrpc call drupal_http_request which makes an HTTP request. When tests try to call these functions they don't pass the SimpleTest user-agent (database-prefix) information like the cURL handler does.
This broke a number of tests that used to pass before the database-prefixing was implemented.
To fix this a patch similar to simpletest_review_blogapi_xmlrpc.patch at http://drupal.org/node/245955 should be created. Instead of that patch which is specific for xmlrpc stuff a more broad catch-all patch should be applied.
I have create a patch that fixes the issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | add_simpletest_user_agent.patch | 1.43 KB | boombatower |
| #5 | add_simpletest_user_agent.patch | 1.21 KB | boombatower |
| #3 | add_simpletest_user_agent.patch | 1.02 KB | boombatower |
| add_simpletest_user_agent.patch | 1.06 KB | boombatower |
Comments
Comment #1
chx commented$simpletest_ua_keythis is not used in core.Comment #2
boombatower commentedI was wondering about that since I remember discussion about it not being necessary.
Comment #3
boombatower commentedUpdated patch. Previous one still worked since it just ignored the extra key. :)
Comment #4
dries commentedI'd like to see a bit more code comments in the code. We should explain _why_ this is needed. Thanks for your hard work. :)
Comment #5
boombatower commentedAdded more comments.
Comment #6
dries commentedI still think it needs more documentation. Why do we have to use headers instead of, say, a database variable. I know the answer, but it would be good to explain this. You added the "what", but the "why" and "how" is still missing from the documentation. We're almost there ...
Comment #7
boombatower commentedProbably a good idea since it is a rather odd bit of code.
Comment #8
boombatower commentedI think that has been reviewed and it just needed comments...
Comment #9
boombatower commentedThis is showing up in another issue so it would be nice to get it resolved.
Comment #10
damien tournoud commentedFor what is worth, this looks good now.
Comment #11
catchThis fixes http://drupal.org/node/259988 - so confirming the RTBC and marking as critical.
Comment #12
floretan commentedThis should fix #249154: Aggregator tests fail when existing content is present. as well.
Comment #13
cwgordon7 commentedNote that this fixes xmlrpc tests too (#268063: Move includes/tests to simpletest/tests & provide hidden .info propery).
Comment #14
boombatower commentedYea! Three tests!
Comment #15
dries commentedCommitted to CVS HEAD. Thanks.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.