Last modified: 2012-04-16 09:16:07 UTC
multiple runs of ApiUploadTest have different results. Sometimes they succeed, sometimes fail. Oddly, printing debug information seems to make the errors more elusive. Arguably ApiUploadTest is done wrong; it should open up a real HTTP connection rather than elaborately simulating an API request.
Is this actually in wikimedia-deployment, or on trunk? I wouldn't trust any of the unit tests to run on deployment, lots of unmerged changes there.
the purpose of ApiUploadTest is not to test the actual upload so much as the code path handling the API upload. Requiring the test to use an actual web server would mean the tests couldn't be used by as many people.
Is this still an issue?
Yes, it still happens from time to time. See http://integration.mediawiki.org/ci/job/MediaWiki-sqlite-phpunit/6690/testReport/junit/(root)/ApiUploadTest/testUploadStash/
Antoine is going to remove this test from the default group of tests. I'm unassigning this from him for now. Whoever takes this on probably needs to set up mock objects and other mechanisms to avoid this unreliability in testing.
Disabled with r110790