Last modified: 2013-03-06 17:21:30 UTC
During test runs with "sufficient few previous tests" the test runs for the API fails, typically with an fatal error in AbuseFilter. john@loke[master] ~/Workspace/core/tests/phpunit> env 'MW_INSTALL_PATH=/var/www/repo' php phpunit.php --verbose --group WikibaseAPI --conf /var/www/repo/LocalSettings.phpPHPUnit 3.6.10 by Sebastian Bergmann. Configuration read from /home/john/Workspace/core/tests/phpunit/suite.xml .PHP Fatal error: Call to a member function canExist() on a non-object in /home/john/Workspace/AbuseFilter/AbuseFilter.hooks.php on line 86 PHP Stack trace: PHP 1. {main}() /home/john/Workspace/core/tests/phpunit/phpunit.php:0 PHP 2. MediaWikiPHPUnitCommand::main() /home/john/Workspace/core/tests/phpunit/phpunit.php:107 PHP 3. MediaWikiPHPUnitCommand->run() /home/john/Workspace/core/tests/phpunit/MediaWikiPHPUnitCommand.php:47 PHP 4. PHPUnit_TextUI_Command->run() /home/john/Workspace/core/tests/phpunit/MediaWikiPHPUnitCommand.php:61 PHP 5. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192 PHP 6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325 PHP 7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705 PHP 8. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705 PHP 9. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705 PHP 10. PHPUnit_Framework_TestSuite->runTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:745 PHP 11. MediaWikiTestCase->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:772 PHP 12. PHPUnit_Framework_TestCase->run() /home/john/Workspace/core/tests/phpunit/MediaWikiTestCase.php:116 PHP 13. PHPUnit_Framework_TestResult->run() /usr/share/php/PHPUnit/Framework/TestCase.php:751 PHP 14. PHP_Invoker->invoke() /usr/share/php/PHPUnit/Framework/TestResult.php:647 PHP 15. call_user_func_array() /usr/share/php/PHP/Invoker.php:93 PHP 16. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHP/Invoker.php:93 PHP 17. PHPUnit_Framework_TestCase->runTest() /usr/share/php/PHPUnit/Framework/TestCase.php:804 PHP 18. ReflectionMethod->invokeArgs() /usr/share/php/PHPUnit/Framework/TestCase.php:942 PHP 19. Wikibase\Test\ApiBotEditTest->testSetItemTop() /usr/share/php/PHPUnit/Framework/TestCase.php:942 PHP 20. ApiTestCase->doApiRequest() /home/john/Workspace/Wikibase/repo/tests/phpunit/includes/api/ApiBotEditTest.php:125 PHP 21. ApiMain->execute() /home/john/Workspace/core/tests/phpunit/includes/api/ApiTestCase.php:82 PHP 22. ApiMain->executeAction() /home/john/Workspace/core/includes/api/ApiMain.php:347 PHP 23. Wikibase\ApiModifyEntity->execute() /home/john/Workspace/core/includes/api/ApiMain.php:830 PHP 24. Wikibase\EditEntity->attemptSave() /home/john/Workspace/Wikibase/repo/includes/api/ApiModifyEntity.php:196 PHP 25. wfRunHooks() /home/john/Workspace/Wikibase/repo/includes/EditEntity.php:627 PHP 26. Hooks::run() /home/john/Workspace/core/includes/GlobalFunctions.php:3875 PHP 27. call_user_func_array() /home/john/Workspace/core/includes/Hooks.php:255 PHP 28. AbuseFilterHooks::onEditFilterMergedContent() /home/john/Workspace/core/includes/Hooks.php:255 PHP 29. AbuseFilterHooks::filterEdit() /home/john/Workspace/AbuseFilter/AbuseFilter.hooks.php:56
https://gerrit.wikimedia.org/r/#/c/49027/
This is merged.
Verified in Wikidata demo sprint 34