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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Status: Needs review » Needs work

$simpletest_ua_key this is not used in core.

boombatower’s picture

I was wondering about that since I remember discussion about it not being necessary.

boombatower’s picture

Status: Needs work » Needs review
FileSize
1.02 KB

Updated patch. Previous one still worked since it just ignored the extra key. :)

Dries’s picture

Status: Needs review » Needs work

I'd like to see a bit more code comments in the code. We should explain _why_ this is needed. Thanks for your hard work. :)

boombatower’s picture

Status: Needs work » Needs review
FileSize
1.21 KB

Added more comments.

Dries’s picture

Status: Needs review » Needs work

I 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 ...

boombatower’s picture

Status: Needs work » Needs review
FileSize
1.43 KB

Probably a good idea since it is a rather odd bit of code.

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

I think that has been reviewed and it just needed comments...

boombatower’s picture

This is showing up in another issue so it would be nice to get it resolved.

Damien Tournoud’s picture

For what is worth, this looks good now.

catch’s picture

Priority: Normal » Critical

This fixes http://drupal.org/node/259988 - so confirming the RTBC and marking as critical.

floretan’s picture

cwgordon7’s picture

boombatower’s picture

Yea! Three tests!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.