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 CreditAttribution: chx commented$simpletest_ua_key
this is not used in core.Comment #2
boombatower CreditAttribution: boombatower commentedI was wondering about that since I remember discussion about it not being necessary.
Comment #3
boombatower CreditAttribution: boombatower commentedUpdated patch. Previous one still worked since it just ignored the extra key. :)
Comment #4
Dries CreditAttribution: 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 CreditAttribution: boombatower commentedAdded more comments.
Comment #6
Dries CreditAttribution: 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 CreditAttribution: boombatower commentedProbably a good idea since it is a rather odd bit of code.
Comment #8
boombatower CreditAttribution: boombatower commentedI think that has been reviewed and it just needed comments...
Comment #9
boombatower CreditAttribution: boombatower commentedThis is showing up in another issue so it would be nice to get it resolved.
Comment #10
Damien Tournoud CreditAttribution: 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 CreditAttribution: floretan commentedThis should fix #249154: Aggregator tests fail when existing content is present. as well.
Comment #13
cwgordon7 CreditAttribution: cwgordon7 commentedNote that this fixes xmlrpc tests too (#268063: Move includes/tests to simpletest/tests & provide hidden .info propery).
Comment #14
boombatower CreditAttribution: boombatower commentedYea! Three tests!
Comment #15
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.